Creates a buffered polygon around a line segment (transect), handling dateline crossings and projecting to appropriate UTM zone for accurate distance calculations.
buffer_transect(coords, buffer_dist = 5000)List containing:
utm_crs - EPSG code for the UTM projection used
segment - sf linestring object in WGS84 (EPSG:4326)
segment_utm - sf linestring object in UTM projection
buffer - sf polygon buffer in WGS84 (EPSG:4326)
buffer_utm - sf polygon buffer in UTM projection
The function automatically detects the appropriate UTM zone based on the centroid of the input segment. Dateline crossings are handled by normalizing coordinates to 0-360 range when necessary.
fix_dateline_crossing for dateline crossing detection
modal_depth_profile for UI implementation