Package edu.sc.seis.TauP
Class SvgEarth
java.lang.Object
edu.sc.seis.TauP.SvgEarth
Utilities for generating SVG plots of a slice through the earth model.
Used for plotting ray paths or wavefronts.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SvgEarthScalingcalcEarthScaleTrans(List<Arrival> arrivalList, DistDepthRange distDepthRange) static SvgEarthScalingcalcEarthScaleTransForPhaseList(List<SeismicPhase> phaseList, DistDepthRange distDepthRange, boolean includeNegDist) static intcalcFontSizeForEarthScale(double R, SvgEarthScaling scaleTrans) static intcalcFontSizeForEarthScale(float baseSize, double R, float pixelWidth, SvgEarthScaling scaleTrans) static floatcalcIconSizeForZoom(float baseSize, double R, float pixelWidth, SvgEarthScaling scaleTrans) static SvgEarthScalingcalcZoomScaleTranslate(List<Arrival> arrivals) createBoundingArrivals(List<SeismicPhase> phaseList) static voiddrawLabeledDot(PrintWriter writer, Vector z, float iconSize, double R, float pixelWidth, SvgEarthScaling scaleTrans, String label, String cssclass, String tooltip) static voiddrawScatterSymbols(PrintWriter out, Scatterer scatterer, float R, float pixelWidth, SvgEarthScaling scaleTrans) static voiddrawSourceSymbols(PrintWriter out, double R, float pixelWidth, List<Double> sourceDepths, SvgEarthScaling scaleTrans) static voiddrawStationSymbols(PrintWriter out, double R, List<Double> stationDegreeList, float pixelWidth, SvgEarthScaling scaleTrans) static double[]findPierceBoundingBox(double[] distRangeDeg, double[] depthRange, double R) Find bounding box, in cartesian, that contains the distance and depth range.static double[]findPierceBoundingBox(List<Arrival> arrivals) Find the boundaries of a x-y box that contain all pierce points for the arrivals.static StringformatDistRadius(double calcDist, double radius) protected static StringformatDistRadiusAsXY(double calcDist, double radius) static voidprintCircleTicksAsSVG(PrintWriter out, double R, float pixelWidth, SvgEarthScaling scaleTrans) static voidprintGmtScriptBeginning(PrintWriter out, String psFile, TauModel tMod, float mapWidth, String mapWidthUnit, boolean onlyNamedDiscon, String toolName, List<String> cmdLineArgs) static voidprintModelAsSVG(PrintWriter out, TauModel tMod, float pixelWidth, SvgEarthScaling scaleTrans, boolean onlyNamedDiscon) static voidprintScriptBeginningSvg(PrintWriter out, double R, float pixelWidth, SvgEarthScaling scaleTrans, String toolName, List<String> cmdLineArgs, List<String> colorList, CharSequence extraCSS, CharSequence extraDefs) static voidprintSvgBeginZoom(PrintWriter out, float R, float pixelWidth, SvgEarthScaling scaleTrans) static voidprintSvgEnd(PrintWriter out) static voidstatic double[]xyForDistDegRadius(double calcDist, double radius) static double[]
-
Field Details
-
plotOverScaleFactor
public static final float plotOverScaleFactor- See Also:
-
-
Constructor Details
-
SvgEarth
public SvgEarth()
-
-
Method Details
-
calcEarthScaleTransForPhaseList
public static SvgEarthScaling calcEarthScaleTransForPhaseList(List<SeismicPhase> phaseList, DistDepthRange distDepthRange, boolean includeNegDist) -
calcEarthScaleTrans
public static SvgEarthScaling calcEarthScaleTrans(List<Arrival> arrivalList, DistDepthRange distDepthRange) -
findPierceBoundingBox
public static double[] findPierceBoundingBox(double[] distRangeDeg, double[] depthRange, double R) Find bounding box, in cartesian, that contains the distance and depth range. Whole earth is [-R, R, -R, R]- Parameters:
distRangeDeg-depthRange-R-- Returns:
- [xmin, xmax, ymin, ymax]
-
findPierceBoundingBox
Find the boundaries of a x-y box that contain all pierce points for the arrivals.- Parameters:
arrivals- to search- Returns:
- array of xmin, xmax, ymin, ymax in x-y coordinates (not dist-depth)
-
createBoundingArrivals
-
printCircleTicksAsSVG
public static void printCircleTicksAsSVG(PrintWriter out, double R, float pixelWidth, SvgEarthScaling scaleTrans) -
printSvgBeginZoom
public static void printSvgBeginZoom(PrintWriter out, float R, float pixelWidth, SvgEarthScaling scaleTrans) -
printModelAsSVG
public static void printModelAsSVG(PrintWriter out, TauModel tMod, float pixelWidth, SvgEarthScaling scaleTrans, boolean onlyNamedDiscon) -
drawLabeledDot
public static void drawLabeledDot(PrintWriter writer, Vector z, float iconSize, double R, float pixelWidth, SvgEarthScaling scaleTrans, String label, String cssclass, String tooltip) -
drawSourceSymbols
public static void drawSourceSymbols(PrintWriter out, double R, float pixelWidth, List<Double> sourceDepths, SvgEarthScaling scaleTrans) -
drawScatterSymbols
public static void drawScatterSymbols(PrintWriter out, Scatterer scatterer, float R, float pixelWidth, SvgEarthScaling scaleTrans) -
drawStationSymbols
public static void drawStationSymbols(PrintWriter out, double R, List<Double> stationDegreeList, float pixelWidth, SvgEarthScaling scaleTrans) -
xyForVector
-
xyForDistDegRadius
public static double[] xyForDistDegRadius(double calcDist, double radius) -
formatDistRadiusAsXY
-
formatDistRadius
-
calcZoomScaleTranslate
-
printSvgEndZoom
-
printSvgEnd
-
printGmtScriptBeginning
-
calcFontSizeForEarthScale
-
calcFontSizeForEarthScale
public static int calcFontSizeForEarthScale(float baseSize, double R, float pixelWidth, SvgEarthScaling scaleTrans) -
calcIconSizeForZoom
public static float calcIconSizeForZoom(float baseSize, double R, float pixelWidth, SvgEarthScaling scaleTrans) -
printScriptBeginningSvg
public static void printScriptBeginningSvg(PrintWriter out, double R, float pixelWidth, SvgEarthScaling scaleTrans, String toolName, List<String> cmdLineArgs, List<String> colorList, CharSequence extraCSS, CharSequence extraDefs)
-