<< Click to Display Table of Contents >>
## Sample Elevations in Reports using ZFrom and ZTo |

The standard Analytical Results EQuIS reports include sample elevation output calculated by subtracting sample start and end depths from the sample location surface elevation in the EQuIS Database. The EQuIS function v54. analytical_results, derives these z fields as follows.

zfrom = DT_COORDINATE.ELEV - DT_SAMPLE.START_DEPTH

zto = DT_COORDINATE.ELEV - DT_SAMPLE.END_DEPTH

Additional standard EQuIS reports that depend on this analytical results function and VW_LOCATION use the same logic and the sample elevation output generated is used by EQuIS interfaces, such as EQuIS for ArcGIS and EnviroInsite.

If an elevation or start/end depth value found is not a valid number, NULL is returned.

The z field calculations require that the related unit fields are populated for applying the correct units (and unit conversions as needed).

In general, DT_SAMPLE.DEPTH_UNIT is used as the original unit and VW_LOCATION.ELEV_UNIT is used as the target unit. The EQuIS VW_LOCATION view performs the unit conversions using the following logic. The VW_LOCATION.ELEV_UNIT (target unit) pulls from DT_FACILITY.ELEV_UNIT by default. If the DT_FACILITY.ELEV_UNIT is null, the report uses DT_LOCATION.UNITS or DT_COORDINATE.ELEV_UNIT, in this order. If these units are not found, the system will use the VW_LOCATION.ELEV_UNIT for the original unit, and DT_SAMPLE.DEPTH_UNIT for the target unit. The unit conversion logic uses one of three units based on the following order.

Original unit: DT_COORDINATE.ELEV_UNIT, DT_LOCATION.UNITS, DT_FACILITY.ELEV_UNIT

Target unit: DT_FACILITY.ELEV_UNIT, DT_LOCATION.UNITS, DT_COORDINATE.ELEV_UNIT

For water samples, clients may use a stored procedure or report to copy the screened intervals from DT_WELL_SEGMENT and put the screened internal depths into DT_SAMPLE.START_DEPTH and END_DEPTH. Setting DT_SAMPLE.START_DEPTH and END_DEPTH to the screened interval is appropriate for water samples, and could also potentially be done using an EDP format.

Copyright © 2020 EarthSoft, Inc • Modified: 01 Apr 2020