Standardization of Highway Survey Points: Cleaning and Formatting PENZD Coordinate Data
A complete technical guide on standardizing total station and GPS survey files into cleaned PENZD datasets for Civil 3D.
Field survey data is collected using total stations or GNSS receivers. The resulting raw coordinate files often contain formatting inconsistencies: mismatched column order, text entries in numeric fields, duplicate point IDs, or incorrect elevation datums. These inconsistencies must be cleaned before importing the data into design databases.
Standardizing the point file into the PENZD format ensures compatibility with Civil 3D and other design software.
1. Standard PENZD Mapping Fields
The PENZD format organizes coordinate data into five comma-separated columns:
| Column | Code | Format Requirement | Validation Rule |
|---|---|---|---|
| 1 | P (Point) | Integer (e.g., 1001) | Must be unique, positive index |
| 2 | E (Easting) | Float (6 decimals) | Within project UTM grid limits |
| 3 | N (Northing) | Float (6 decimals) | Within project UTM grid limits |
| 4 | Z (Elevation) | Float (3 decimals) | Matches project vertical datum |
| 5 | D (Description) | Alphanumeric string (e.g., CL) | Validates against code libraries |
2. Client-Side Coordinate Parsing Code
The following JavaScript code validates and standardizes coordinate rows, filtering out invalid points:
function parseSurveyRow(row, mappings) {
const parts = row.split(",");
const e = parseFloat(parts[mappings.eastingIndex]);
const n = parseFloat(parts[mappings.northingIndex]);
const z = parseFloat(parts[mappings.elevationIndex]);
if (isNaN(e) || isNaN(n) || isNaN(z)) {
return null; // Skip invalid numeric lines
}
return {
point: parseInt(parts[mappings.pointIndex], 10),
easting: parseFloat(e.toFixed(3)),
northing: parseFloat(n.toFixed(3)),
elevation: parseFloat(z.toFixed(3)),
description: parts[mappings.descriptionIndex]?.trim() || "GP"
};
}This parser filters out incomplete coordinates, ensuring that surface generation algorithms in Civil 3D run smoothly.