Class OpenStreetMapView
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.tools.spreadsheetviewer.AbstractViewPlugin
-
- adams.gui.tools.spreadsheetviewer.OpenStreetMapView
-
- All Implemented Interfaces:
adams.core.Destroyable
,adams.core.GlobalInfoSupporter
,adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,adams.core.option.OptionHandler
,adams.core.ShallowCopySupporter<adams.gui.tools.spreadsheetviewer.AbstractViewPlugin>
,adams.core.SizeOfHandler
,Serializable
public class OpenStreetMapView extends adams.gui.tools.spreadsheetviewer.AbstractViewPlugin
Displays the GIS data in OpenStreetMap (OSM).- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
KEY_FORMAT
for key for the format.static String
KEY_GPS
for key for the GPS column.static String
KEY_LATITUDE
for key for the latitude column.static String
KEY_LONGITUDE
for key for the longitude column.static String
KEY_META_DATA_COLUMNS
for key for the meta-data columns.static String
STORAGE_NAME
the name for the spreadsheet in the flow's storage.
-
Constructor Summary
Constructors Constructor Description OpenStreetMapView()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
display(adams.core.Properties props, adams.data.spreadsheet.SpreadSheet sheet)
Displays the data on a map.protected adams.gui.core.BasePanel
doGenerate(adams.data.spreadsheet.SpreadSheet sheet)
Performs the actual generation of the information.protected adams.flow.control.Flow
generateFlow(String name, adams.core.Properties props, adams.data.spreadsheet.SpreadSheet sheet)
Generates the flow from the setup and data.String
getMenuIcon()
Returns the file name of the icon.String
getMenuText()
Returns the text of the menu item.String
globalInfo()
Returns a string describing the object.boolean
requiresButtons()
Returns whether the dialog requires the OK/Cancel buttons.-
Methods inherited from class adams.gui.tools.spreadsheetviewer.AbstractViewPlugin
canView, check, generate, getCanceledByUser, getCurrentPanel, getLastSetup, getPlugins, hasLastSetup, setCurrentPanel, setLastSetup, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, defineOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
KEY_META_DATA_COLUMNS
public static final String KEY_META_DATA_COLUMNS
for key for the meta-data columns.- See Also:
- Constant Field Values
-
KEY_FORMAT
public static final String KEY_FORMAT
for key for the format.- See Also:
- Constant Field Values
-
KEY_GPS
public static final String KEY_GPS
for key for the GPS column.- See Also:
- Constant Field Values
-
KEY_LONGITUDE
public static final String KEY_LONGITUDE
for key for the longitude column.- See Also:
- Constant Field Values
-
KEY_LATITUDE
public static final String KEY_LATITUDE
for key for the latitude column.- See Also:
- Constant Field Values
-
STORAGE_NAME
public static final String STORAGE_NAME
the name for the spreadsheet in the flow's storage.- See Also:
- Constant Field Values
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceadams.core.GlobalInfoSupporter
- Specified by:
globalInfo
in classadams.core.option.AbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
getMenuText
public String getMenuText()
Returns the text of the menu item.- Specified by:
getMenuText
in classadams.gui.tools.spreadsheetviewer.AbstractViewPlugin
- Returns:
- the text
-
getMenuIcon
public String getMenuIcon()
Returns the file name of the icon.- Specified by:
getMenuIcon
in classadams.gui.tools.spreadsheetviewer.AbstractViewPlugin
- Returns:
- the filename or null if no icon available
-
requiresButtons
public boolean requiresButtons()
Returns whether the dialog requires the OK/Cancel buttons.- Overrides:
requiresButtons
in classadams.gui.tools.spreadsheetviewer.AbstractViewPlugin
- Returns:
- true if the dialog requires the buttons
-
doGenerate
protected adams.gui.core.BasePanel doGenerate(adams.data.spreadsheet.SpreadSheet sheet)
Performs the actual generation of the information.- Specified by:
doGenerate
in classadams.gui.tools.spreadsheetviewer.AbstractViewPlugin
- Parameters:
sheet
- the sheet to process- Returns:
- the generated information panel
-
generateFlow
protected adams.flow.control.Flow generateFlow(String name, adams.core.Properties props, adams.data.spreadsheet.SpreadSheet sheet) throws Exception
Generates the flow from the setup and data.- Parameters:
name
- the tab titleprops
- the setupsheet
- the data to display- Returns:
- the generated flow, null if failed to generate
- Throws:
Exception
- if flow generation fails
-
display
protected void display(adams.core.Properties props, adams.data.spreadsheet.SpreadSheet sheet)
Displays the data on a map.- Parameters:
props
- the setupsheet
- the data to display
-
-