Adjust 3D Z Values
Overview
The Adjust 3D Z Values tool batch modifies vector features that contain Z coordinates. It supports point, line, polygon, and multipart geometries, and can apply sign inversion, unit conversion, fixed offsets, or per-feature offsets from a field to Z values.
This tool is commonly used to correct elevation datums before loading 3D data, standardize units, convert signs between depth and elevation values, and normalize Z values across different data sources.
How It Works
For each vertex with a Z value, the tool calculates the new Z value in the following order:
Where is the Z value after optional sign inversion, is the conversion factor from the source unit to meters, is the conversion factor from the target unit to meters, and is the adjustment amount.
If Invert Z sign is enabled:
Otherwise:
Adjustment field takes precedence over Fixed adjustment value. If the specified adjustment field exists, the tool reads the field value of each feature as the adjustment amount. If it is not specified or the field does not exist, the fixed adjustment value is used. The adjustment amount is added after unit conversion and should usually be interpreted in the target unit.
Use Cases
- 3D visualization correction: raise or lower pipelines, building outlines, or trajectory lines as a whole.
- Unit standardization: convert Z values from feet, inches, yards, or other units to meters, or to another unit required by the project.
- Elevation datum conversion: correct Z values with a fixed correction value or a per-feature correction field.
- Depth/elevation sign conversion: convert depth data that is positive downward to elevation values that are positive upward, or the reverse.
Parameters
| Parameter | Description | Notes |
|---|---|---|
| Input vector file | The 3D feature dataset whose Z values need to be adjusted. | Required. At least one geometry should contain Z coordinates. |
| Invert Z sign | Specifies whether to multiply Z values by -1 before other calculations. | Optional. Default: False. |
| Fixed adjustment value | A fixed Z offset applied to all features. | Required. Default: 0.0. Used only when no valid adjustment field is used. |
| Adjustment field | Reads per-feature Z offsets from an attribute field. | Optional. Takes precedence over the fixed adjustment value when the field exists. |
| Source unit | The unit of the Z values in the input geometry. | Required. Default: meter. |
| Target unit | The unit of the Z values in the output geometry. | Required. Default: meter. |
| Output vector file | The adjusted 3D feature dataset. | Required. Input attributes are preserved. |
Supported units are listed below:
| Parameter value | Unit | Conversion factor to meters |
|---|---|---|
millimeter | Millimeter | 0.001 |
centimeter | Centimeter | 0.01 |
meter | Meter | 1.0 |
inch | Inch | 0.0254 |
foot | Foot | 0.3048 |
yard | Yard | 0.9144 |
fathom | Fathom | 1.8288 |
Output
The output is a new vector feature dataset. Output geometries keep the original X and Y coordinates and update the Z coordinates of vertices that have Z values. Attribute fields remain unchanged. If the input geometry contains M values, the current implementation preserves them where possible.
Steps
- Start the tool: Open Geoprocessing Toolbox > Vector > Feature processing > Build, then start the Adjust 3D Z Values tool pane.
- Set the input: Select the Input vector file that contains Z coordinates.
- Choose sign handling: To switch between elevation and depth directions, enable Invert Z sign.
- Set the adjustment amount: If all features use the same offset, enter a Fixed adjustment value. If each feature uses a different offset, select an Adjustment field.
- Set unit conversion: Select the Source unit and Target unit, and make sure the adjustment value uses the target unit.
- Configure the output: Set the path and name of the Output vector file.
- Run and check the result: Click Run. After the tool finishes, check the Z value range, 3D display effect, and attribute fields.
Notes
- Input features must contain Z coordinates. If none of the geometries contain Z values, the tool reports that the input data does not contain Z values.
- The adjustment field should be numeric. Null values are treated as
0.0. - The fixed adjustment value or field-based adjustment amount is added after unit conversion, so prepare it in the target unit when possible.
- A geographic coordinate system only affects the meaning of X and Y coordinates. Z values are still handled by elevation or depth units.
- Before processing, back up the original 3D features and validate the sign, unit, and offset direction with a small sample.