Class 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.
      • Fields inherited from class adams.gui.tools.spreadsheetviewer.AbstractViewPlugin

        m_CanceledByUser, m_CurrentPanel, m_LastSetup, m_Panel
      • Fields inherited from class adams.core.option.AbstractOptionHandler

        m_OptionManager
      • Fields inherited from class adams.core.logging.LoggingObject

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • 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
      • Methods inherited from interface adams.core.logging.LoggingLevelHandler

        getLoggingLevel
    • Constructor Detail

      • OpenStreetMapView

        public OpenStreetMapView()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.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 class adams.gui.tools.spreadsheetviewer.AbstractViewPlugin
        Returns:
        the text
      • getMenuIcon

        public String getMenuIcon()
        Returns the file name of the icon.
        Specified by:
        getMenuIcon in class adams.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 class adams.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 class adams.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 title
        props - the setup
        sheet - 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 setup
        sheet - the data to display