Package gov.usgs.earthquake.shakemap
Class GridXYZHandler
java.lang.Object
gov.usgs.earthquake.shakemap.GridXYZHandler
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
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SimpleDateFormat
Format for event timesstatic final SimpleDateFormat
Format for process times -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
Appends a string array of parts with a delimeter inbetweenvoid
parse
(InputStream in) Read first line of grid.xyz file and set properties on ShakeMap object.void
setShakemap
(ShakeMap shakemap)
-
Field Details
-
EVENT_TIMESTAMP_FORMAT
Format for event times -
PROCESS_TIMESTAMP_FORMAT
Format for process times
-
-
Constructor Details
-
GridXYZHandler
Constructor- Parameters:
shakemap
- a shakemap
-
-
Method Details
-
getShakemap
- Returns:
- shakemap
-
setShakemap
- Parameters:
shakemap
- to set
-
parse
Read first line of grid.xyz file and set properties on ShakeMap object.- Parameters:
in
- the grid.xyz input stream.- Throws:
Exception
- if error occurs
-
join
Appends a string array of parts with a delimeter inbetween- Parameters:
delimeter
- to add between partsparts
- string array to combine- Returns:
- A string of delimited parts
-