Package nz.org.riskscape.usgs
Class UsgsShakeMapReader
java.lang.Object
nz.org.riskscape.usgs.UsgsShakeMapReader
- Direct Known Subclasses:
UsgsShakeMapMultiDatasetReader
Helper to read a datasets from an USGS shakemap file (e.g. shake_result.hdf) and turn it into a spatial coverage. Shakemaps are slightly different to other HDF5 files in that the lat/long coordinates aren't present in a dataset, but instead the bounds/extent of the data is encoded as HDF5 attributes as part of the dataset, i.e. xmin, xmax, ymin, ymax.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionnz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.data.coverage.Dataset2D>
getData()
Returns the underlying HDF5 data in a form that can be queried by an x,y index.protected nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.data.coverage.Dataset2D>
getDataset2D
(String datasetPath) nz.org.riskscape.problem.ResultOrProblems<org.geotools.geometry.jts.ReferencedEnvelope>
Reads the latitude/longitude co-ordinates used for the given dataset in the shakemap.protected nz.org.riskscape.hdf5.H5Dataset
openDataset
(String dataset)
-
Constructor Details
-
UsgsShakeMapReader
-
-
Method Details
-
openDataset
-
getData
public nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.data.coverage.Dataset2D> getData()Returns the underlying HDF5 data in a form that can be queried by an x,y index.
-
getDataset2D
protected nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.data.coverage.Dataset2D> getDataset2D(String datasetPath) -
getExtent
public nz.org.riskscape.problem.ResultOrProblems<org.geotools.geometry.jts.ReferencedEnvelope> getExtent()Reads the latitude/longitude co-ordinates used for the given dataset in the shakemap.
- Returns:
- an envelope that holds the extent of the PGA grid
-