|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensha.commons.mapping.gmt.GMT_MapGenerator
public class GMT_MapGenerator
Title: GMT_MapGenerator
Description: This class generates Maps using the java wrapper around GMT
| Constructor Summary | |
|---|---|
GMT_MapGenerator()
|
|
| Method Summary | |
|---|---|
static void |
addCleanup(ArrayList<String> gmtCommandLines,
ArrayList<String> rmFiles)
|
static void |
addCoastCommand(ArrayList<String> gmtCommandLines,
GMT_Map map,
String region,
String proj,
String psFile)
|
static void |
addColorbarCommand(ArrayList<String> gmtCommandLines,
GMT_Map map,
double colorScaleMin,
double colorScaleMax,
String cptFile,
String psFile)
|
static void |
addColorbarCommand(ArrayList<String> gmtCommandLines,
String scaleLabel,
boolean isLog,
double colorScaleMin,
double colorScaleMax,
String cptFile,
String psFile)
|
protected void |
addFinalGMT_ScriptLines(ArrayList gmtCommandLines)
Function to adds any final commands desired by a subclass. |
static void |
addHighwayCommand(ArrayList<String> gmtCommandLines,
GMT_Map map,
String region,
String proj,
String psFile)
|
protected void |
addIntermediateGMT_ScriptLines(ArrayList gmtLines)
This method allows subclasses to add intemediate lines the the GMT script. |
static void |
addPolyCommands(ArrayList<String> gmtCommandLines,
GMT_Map map,
String region,
String proj,
String psFile)
|
static void |
addSpecialElements(ArrayList<String> gmtCommandLines,
GMT_Map map,
String region,
String proj,
String psFile)
|
static void |
addSymbolCommands(ArrayList<String> gmtCommandLines,
GMT_Map map,
String region,
String proj,
String psFile)
|
static void |
addSymbolSetCommands(ArrayList<String> gmtCommandLines,
GMT_Map map,
String region,
String proj,
String psFile)
|
void |
createMapInfoFile(String mapInfo)
This simply saves the supplied string to an ascii file that is placed in the same directory where the image, gmt script, etc. |
ListIterator |
getAdjustableParamsIterator()
method to get the adjustable parameters |
ParameterList |
getAdjustableParamsList()
|
GriddedRegion |
getEvenlyGriddedGeographicRegion()
|
protected ArrayList |
getGMT_ScriptLines()
This method generates a list of strings needed for the GMT script |
ArrayList<String> |
getGMT_ScriptLines(GMT_Map map,
String dir)
This method generates a list of strings needed for the GMT script |
static String |
getGMTColorString(Color color)
|
String |
getGMTFilesWebAddress()
|
GMT_Map |
getGMTMapSpecification(GeoDataSet xyzData)
|
static ArrayList<String> |
getGMTPathEnvLines()
|
String |
getImageFileName()
|
protected ArrayList |
getMapInfoLines()
|
protected void |
makeFileFromLines(ArrayList lines,
String fileName)
|
String |
makeMapLocally(GeoDataSet xyzDataSet,
String scaleLabel,
String metadata,
String dirName)
this function generates a GMT map from an XYZ data set using the current parameter settings, and using the version of GMT on the local computer. |
String |
makeMapUsingServlet(GeoDataSet xyzDataSet,
String scaleLabel,
String metadata,
String dirName)
This generates GMT map for the given XYZ dataset and for the current parameter setting, using the GMT Servlet on the SCEC server (the map is made on the SCEC server). |
String |
makeMapUsingServlet(GMT_Map map,
String metadata,
String dirName)
This generates GMT map for the given XYZ dataset and for the current parameter setting, using the GMT Servlet on the SCEC server (the map is made on the SCEC server). |
String |
makeMapUsingWebServer(GeoDataSet xyzDataSet,
String scaleLabel,
String metadata)
This generates GMT map for the given XYZ dataset and for the current parameter setting, using the GMT Web Service on the SCEC server (the map is made on the SCEC server). |
protected String |
openServletConnection(GMT_Map map,
String metadataLines,
String dirName)
sets up the connection with the servlet on the server (gravity.usc.edu) |
void |
setMetatdataFileName(String fileName)
sets the name of the metadata file with fileName( with full path) |
void |
setParameter(String paramName,
Object value)
This method allows one to set an adjustable parameter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String C
protected static final boolean D
protected static final String DEFAULT_GMT_SCRIPT_NAME
protected String GMT_SCRIPT_NAME
protected static final String DEFAULT_XYZ_FILE_NAME
protected String XYZ_FILE_NAME
protected static final String DEFAULT_METADATA_FILE_NAME
protected String METADATA_FILE_NAME
protected static final String DEFAULT_PS_FILE_NAME
protected String PS_FILE_NAME
public static final String DEFAULT_JPG_FILE_NAME
protected String JPG_FILE_NAME
public static final String DEFAULT_PNG_FILE_NAME
protected String PNG_FILE_NAME
protected static final String DEFAULT_PDF_FILE_NAME
protected String PDF_FILE_NAME
protected String SCALE_LABEL
public static final String OPENSHA_GMT_PATH
public static final String OPENSHA_GS_PATH
public static final String OPENSHA_PS2PDF_PATH
public static final String OPENSHA_CONVERT_PATH
public static final String OPENSHA_GMT_DATA_PATH
public static final String OPENSHA_SERVLET_URL
public static final String OPENSHA_JAVA_PATH
public static final String OPENSHA_CLASSPATH
public static final String OPENSHA_NETCDF_LIB_PATH
public static String SCEC_GMT_DATA_PATH
protected static String GMT_PATH
protected static String GS_PATH
protected static String CONVERT_PATH
protected static String PS2PDF_PATH
protected static String NETCDF_LIB_PATH
protected static String COMMAND_PATH
protected GeoDataSet xyzDataSet
protected String xOff
protected String yOff
protected String region
protected String projWdth
public static final String MIN_LAT_PARAM_NAME
public static final String MAX_LAT_PARAM_NAME
public static final String MIN_LON_PARAM_NAME
public static final String MAX_LON_PARAM_NAME
public static final String GRID_SPACING_PARAM_NAME
public static final String IMAGE_WIDTH_NAME
protected static final Double IMAGE_WIDTH_DEFAULT
public static final String CPT_PARAM_NAME
protected static final GMT_CPT_Files CPT_PARAM_DEFAULT
public static final String COAST_PARAM_NAME
public static final String COAST_DRAW
public static final String COAST_FILL
public static final String COAST_NONE
protected static final String COAST_DEFAULT
public static final String COLOR_SCALE_MODE_NAME
public static final String COLOR_SCALE_MODE_INFO
public static final String COLOR_SCALE_MODE_MANUALLY
public static final String COLOR_SCALE_MODE_FROMDATA
public static final String COLOR_SCALE_MODE_DEFAULT
public static final String COLOR_SCALE_MIN_PARAM_NAME
public static final String COLOR_SCALE_MAX_PARAM_NAME
public static final String DPI_PARAM_NAME
protected static final Integer DPI_DEFAULT
public static final String GMT_SMOOTHING_PARAM_NAME
protected static final boolean GMT_SMOOTHING_DEFAULT
public static final String BLACK_BACKGROUND_PARAM_NAME
protected static final boolean BLACK_BACKGROUND_PARAM_DEFAULT
public static final String TOPO_RESOLUTION_PARAM_NAME
public static final String TOPO_RESOLUTION_03_CA
public static final String TOPO_RESOLUTION_06_CA
public static final String TOPO_RESOLUTION_18_CA
public static final String TOPO_RESOLUTION_30_CA
public static final String TOPO_RESOLUTION_30_GLOBAL
protected static final String TOPO_RESOLUTION_PARAM_DEFAULT
public static final String TOPO_RESOLUTION_NONE
public static final String SHOW_HIWYS_PARAM_NAME
public static final String SHOW_HIWYS_PARAM_DEFAULT
public static final String SHOW_HIWYS_PARAM_INFO
public static final String SHOW_HIWYS_ALL
public static final String SHOW_HIWYS_MAIN
public static final String SHOW_HIWYS_OTHER
public static final String SHOW_HIWYS_NONE
public static final String GMT_WEBSERVICE_NAME
public static final String LOG_PLOT_NAME
protected static final boolean LOG_PLOT_PARAM_DEFAULT
protected BooleanParameter logPlotParam
public static final String CUSTOM_SCALE_LABEL_PARAM_CHECK_NAME
protected BooleanParameter customScaleLabelCheckParam
public static final String SCALE_LABEL_PARAM_NAME
protected StringParameter scaleLabelParam
protected ParameterList adjustableParams
protected String imgWebAddr
| Constructor Detail |
|---|
public GMT_MapGenerator()
| Method Detail |
|---|
public String makeMapLocally(GeoDataSet xyzDataSet,
String scaleLabel,
String metadata,
String dirName)
throws GMT_MapException
xyzDataSet - scaleLabel - - a string for the label (with no spaces!)
GMT_MapExceptionpublic GMT_Map getGMTMapSpecification(GeoDataSet xyzData)
public String makeMapUsingServlet(GeoDataSet xyzDataSet,
String scaleLabel,
String metadata,
String dirName)
throws GMT_MapException,
RuntimeException
xyzDataSet - scaleLabel - - a string for the label (with no spaces!)
GMT_MapException
RuntimeException
public String makeMapUsingServlet(GMT_Map map,
String metadata,
String dirName)
throws GMT_MapException,
RuntimeException
xyzDataSet - scaleLabel - - a string for the label (with no spaces!)
GMT_MapException
RuntimeException
public String makeMapUsingWebServer(GeoDataSet xyzDataSet,
String scaleLabel,
String metadata)
throws GMT_MapException
xyzDataSet - scaleLabel - - a string for the label (with no spaces!)
GMT_MapExceptionpublic ListIterator getAdjustableParamsIterator()
public ParameterList getAdjustableParamsList()
public String getImageFileName()
protected ArrayList getMapInfoLines()
protected void makeFileFromLines(ArrayList lines,
String fileName)
public void setMetatdataFileName(String fileName)
fileName -
protected String openServletConnection(GMT_Map map,
String metadataLines,
String dirName)
throws RuntimeException
RuntimeException
public void setParameter(String paramName,
Object value)
paramName - - the name of the Parameter to be setvalue - - the desired parameter valuepublic String getGMTFilesWebAddress()
public GriddedRegion getEvenlyGriddedGeographicRegion()
protected ArrayList getGMT_ScriptLines()
throws GMT_MapException
GMT_MapExceptionpublic static String getGMTColorString(Color color)
public static ArrayList<String> getGMTPathEnvLines()
public ArrayList<String> getGMT_ScriptLines(GMT_Map map,
String dir)
throws GMT_MapException
getGMT_ScriptLines in interface SecureMapGeneratorGMT_MapException
public static void addCleanup(ArrayList<String> gmtCommandLines,
ArrayList<String> rmFiles)
public static void addHighwayCommand(ArrayList<String> gmtCommandLines,
GMT_Map map,
String region,
String proj,
String psFile)
public static void addCoastCommand(ArrayList<String> gmtCommandLines,
GMT_Map map,
String region,
String proj,
String psFile)
public static void addPolyCommands(ArrayList<String> gmtCommandLines,
GMT_Map map,
String region,
String proj,
String psFile)
throws GMT_MapException
GMT_MapException
public static void addSymbolCommands(ArrayList<String> gmtCommandLines,
GMT_Map map,
String region,
String proj,
String psFile)
public static void addSymbolSetCommands(ArrayList<String> gmtCommandLines,
GMT_Map map,
String region,
String proj,
String psFile)
public static void addSpecialElements(ArrayList<String> gmtCommandLines,
GMT_Map map,
String region,
String proj,
String psFile)
throws GMT_MapException
GMT_MapException
public static void addColorbarCommand(ArrayList<String> gmtCommandLines,
GMT_Map map,
double colorScaleMin,
double colorScaleMax,
String cptFile,
String psFile)
public static void addColorbarCommand(ArrayList<String> gmtCommandLines,
String scaleLabel,
boolean isLog,
double colorScaleMin,
double colorScaleMax,
String cptFile,
String psFile)
protected void addIntermediateGMT_ScriptLines(ArrayList gmtLines)
protected void addFinalGMT_ScriptLines(ArrayList gmtCommandLines)
gmtCommandLines - : ArrayList to store the command linepublic void createMapInfoFile(String mapInfo)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||