Profile helper for one or many EDIFile
objects. Computes small-area geometry (easting/northing),
cumulative distance along line, profile azimuth, and
exposes utilities to adjust coordinates and push them back
into EDI headers.
The class accepts a single file, an iterable of files, or
an EDICollection. Coordinates are
read from >HEAD and converted to working planar
coordinates. For short lines the equirectangular
approximation is used, and distances/azimuth are computed
in that local frame.
The small-area equirectangular frame is adequate for short
profiles. For long lines or large latitude spans prefer a
full projection workflow. When the UTM zone can be
determined, adjusted coordinates are converted back to
geographic using that zone.
method ({‘endpoints’, ‘linear’}, default 'endpoints') – With 'endpoints' the azimuth is computed from the
first to the last station. With 'linear' a best-fit
axis is estimated by SVD of centered coordinates.
Returns:
Bearing in [0,360) (clockwise from north), or
None if fewer than two valid stations exist.
method ({‘mean’, ‘median’}, default 'mean') – Aggregation used when returning a scalar spacing.
as_array (bool, default False) – If True, return the pairwise segment lengths as a
1-D array of size n-1. If False, return a
single spacing computed with method.
Returns:
Either a scalar spacing or the per-segment distances.
Adjusted easting/northing are projected back to latitude
and longitude using the dominant UTM zone of the track.
Results are stored in _adj_e/_adj_n/_adj_lat/_adj_lon.
ax (matplotlib.axes.Axes, optional) – Target axes. If omitted, a new figure/axes is made.
use_adjusted (bool, default False) – If True recompute distances from adjusted
coordinates for the overlay. Raw elevation values are
used in both cases.
annotate (bool, default True) – Draw station labels next to points.
Lightweight table view for station metadata derived from
EDIFile objects. Provides quick access to
names, geographic coordinates, optional elevations, and
working projected coordinates to support survey tasks.
The class performs minimal validation. Rows missing
lat/lon are skipped. Projected coordinates are intended
for short-range work; for mapping at scale prefer the
GIS utilities provided elsewhere in the package.
The in-memory row is updated. If the backing
EDIFile is attached for that station, its
>HEAD values are also updated to keep them in sync.
Unknown station ids raise a KeyError.
Return a pandas DataFrame view of the station table.
Parameters:
columns (sequence of str, optional) – Subset and ordering of columns to include. When
omitted, a sensible default is used:
('station','lat','lon','elev','e','n','zone','path'). Missing names are ignored.
index (str or None, default 'station') – Column to set as the DataFrame index. If the name
is not present, no index is set. Use None to
leave the default RangeIndex.
coerce_numeric (bool, default True) – Try converting known numeric columns (lat, lon,
elev, e, n) to numeric dtypes. Non
convertible values become NaN.
Elevation profile helper. Builds paired arrays of
distance and elevation from an EDIProfile,
Stations, a collection, or raw EDIFile
inputs. Includes smoothing, detrending, resampling, and
quick plotting.
Parameters:
items (EDIProfile or Stations or EDICollection or EDIFile ) – or iterable of EDIFile
Source of station positions and elevations. When an
EDIProfile is given, along-line distances are
reused by default.
use_profile_step (bool, default True) – If True and items is an EDIProfile,
copy its along-profile distances; otherwise recompute
distances from planar coordinates.
verbose (int, default 0) – Verbosity level for diagnostics.
Variables:
distance (ndarray of float) – Along-track distances in meters.
elevation (ndarray of float) – Elevation values aligned with distance.
trend (ndarray of float or None) – Fitted linear trend after detrend(). Otherwise
None.
If the input is an EDIProfile that has not yet
computed distances, they are derived automatically. When
distances or elevations are missing the result is empty.