Class SvgEarth

java.lang.Object
edu.sc.seis.TauP.SvgEarth

public class SvgEarth extends Object
Utilities for generating SVG plots of a slice through the earth model. Used for plotting ray paths or wavefronts.
  • Field Details

  • 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

      public static double[] findPierceBoundingBox(List<Arrival> arrivals)
      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

      public static List<Arrival> createBoundingArrivals(List<SeismicPhase> phaseList)
    • 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

      public static double[] xyForVector(Vector v)
    • xyForDistDegRadius

      public static double[] xyForDistDegRadius(double calcDist, double radius)
    • formatDistRadiusAsXY

      protected static String formatDistRadiusAsXY(double calcDist, double radius)
    • formatDistRadius

      public static String formatDistRadius(double calcDist, double radius)
    • calcZoomScaleTranslate

      public static SvgEarthScaling calcZoomScaleTranslate(List<Arrival> arrivals)
    • printSvgEndZoom

      public static void printSvgEndZoom(PrintWriter out)
    • printSvgEnd

      public static void printSvgEnd(PrintWriter out)
    • printGmtScriptBeginning

      public static void printGmtScriptBeginning(PrintWriter out, String psFile, TauModel tMod, float mapWidth, String mapWidthUnit, boolean onlyNamedDiscon, String toolName, List<String> cmdLineArgs)
    • calcFontSizeForEarthScale

      public static int calcFontSizeForEarthScale(double R, SvgEarthScaling scaleTrans)
    • 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)