topbcrd - BSU rotate and translate header geometry coordinates (NEZ survey file)
topbcrd [ -h | infile | theta | sfact | x0 | y0 | z0 ]
Basic Seismic Utilities (BSU) which permits the translation, rotation (around z-axis) and rescale of units. Coordinate values are subjected to a transformation which allows one to convert from one coordinate system to another, and to change the units of the coordinates with a scale factor. A similar program can be used on the headers of seismic (*.seg) files, bcrd. Fortran 77.
Options
-h |
Online help giving details on command line arguments | ||
infile |
Input file name | ||
theta |
Angle of rotation in degrees about the z-axis. Theta is the angle from the current x-axis to the new x-axis, with +theta being counterclockwise (as viewed from above on the positive z-axis) | ||
sfact |
Scale factor to multiply original coordinates by. | ||
x0 |
Translation in x-direction. | ||
y0 |
Translation in y-direction. | ||
z0 |
Translation in z-direction (vertical). |
NOTE:
If invoked with no options, will prompt user for input
parameters. The formula applied is:
sfact*[+cos(theta)*x_old + sin(theta)*y_old] + x0 = x_new
sfact*[-sin(theta)*x_old + cos(theta)*y_old] + y0 = y_new
sfact*[z_old] + z0 = z_new
The rotation is performed about (0,0,0). If you wish to rotate about another point, one solution is to apply the program twice. First translate to a new origin. You will have to rename the output file before using it as input in a second run. On the second pass, rotation will be about the new (0,0,0).
EXAMPLE:
topbcrd stp001.nez 45.2 0.3048 100. 200. 50.
Input survey file, stp001.nez, coordinates are converted from feet to meters (0.3048 sfact). The coordinates are rotated 45.2 degrees from original axis. The x-coordinate is increased by 100 meters, the y-coordinate by 200 meters, and the z-coordinate by 50 meters.
in_file.mod
The prefix is created from the input file name (before the ".nez"), and a new suffix is added, ".mod", to indicate the coordinates have been modified.
in_file.lst
Echo check of input parameters. Naming is as for mod file, but new suffix is ".lst".
bhelp(1), bsegy(5), bcrd(1), top2nez(1), top2dxf(1)
No known bugs.
Copyright © 2024 by Paul Michaels
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
P. Michaels, PE. <paulmichaels@.boisestate.edu>