Class GridXYZHandler


  • public class GridXYZHandler
    extends java.lang.Object
    Parser for ShakeMap grid.xyz metadata. id magnitude latitude longitude month day year hour:minute:second timezone lonMin latMin lonMax latMax (Process time: dow month day hour:minute:second year) eventDescription 2009232_290541 4.2 41.94 -114.09 AUG 20 2009 06:44:11 GMT -115.327 41.0306 -112.844 42.8806 (Process time: Wed Aug 19 23:55:49 2009) 73.1 miles NE of WELLS-NV
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ShakeMap getShakemap()  
      protected java.lang.String join​(java.lang.String delimeter, java.lang.String[] parts)
      Appends a string array of parts with a delimeter inbetween
      void parse​(java.io.InputStream in)
      Read first line of grid.xyz file and set properties on ShakeMap object.
      void setShakemap​(ShakeMap shakemap)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • EVENT_TIMESTAMP_FORMAT

        public static final java.text.SimpleDateFormat EVENT_TIMESTAMP_FORMAT
        Format for event times
      • PROCESS_TIMESTAMP_FORMAT

        public static final java.text.SimpleDateFormat PROCESS_TIMESTAMP_FORMAT
        Format for process times
    • Constructor Detail

      • GridXYZHandler

        public GridXYZHandler​(ShakeMap shakemap)
        Constructor
        Parameters:
        shakemap - a shakemap
    • Method Detail

      • getShakemap

        public ShakeMap getShakemap()
        Returns:
        shakemap
      • setShakemap

        public void setShakemap​(ShakeMap shakemap)
        Parameters:
        shakemap - to set
      • parse

        public void parse​(java.io.InputStream in)
                   throws java.lang.Exception
        Read first line of grid.xyz file and set properties on ShakeMap object.
        Parameters:
        in - the grid.xyz input stream.
        Throws:
        java.lang.Exception - if error occurs
      • join

        protected java.lang.String join​(java.lang.String delimeter,
                                        java.lang.String[] parts)
        Appends a string array of parts with a delimeter inbetween
        Parameters:
        delimeter - to add between parts
        parts - string array to combine
        Returns:
        A string of delimited parts