Documentation of 'visad.data.mcidas.BaseMapAdapter' Java class
BaseMapAdapter
visad.data.mcidas

Class BaseMapAdapter



  • public class BaseMapAdapter
    extends java.lang.Object
    this is an adapter for McIDAS Base Map files
    • Constructor Summary

      Constructors 
      Constructor and Description
      BaseMapAdapter(java.io.InputStream is)
      Create a VisAD UnionSet from a McIDAS Base Map file inputstream
      BaseMapAdapter(java.io.InputStream is, java.awt.geom.Rectangle2D bbox)
      Create a VisAD UnionSet from a McIDAS Base Map file inputstream
      BaseMapAdapter(java.lang.String filename)
      Create a VisAD UnionSet from a local McIDAS Base Map file
      BaseMapAdapter(java.lang.String filename, java.awt.geom.Rectangle2D bbox)
      Create a VisAD UnionSet from a McIDAS Base Map file on the Web
      BaseMapAdapter(java.net.URL url)
      Create a VisAD UnionSet from a McIDAS Base Map file on the Web
      BaseMapAdapter(java.net.URL url, java.awt.geom.Rectangle2D bbox)
      Create a VisAD UnionSet from a McIDAS Base Map file on the Web
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void doByLatLon()
      Set the MathType of the UnionSet to be lat/lon.
      UnionSet getData()
      getData creates a VisAD UnionSet type with the MathType specified thru one of the other methods.
      boolean isEastPositive()
      determine what sign convention for longitude is currently being used.
      void setCoordinateSystem(CoordinateSystem cs, int numEles, int numLines, RealTupleType domain)
      Define a CoordinateSystem whose fromReference() will be used to transform points from latitude/longitude into element,line.
      void setDomainSet(Linear2DSet domainSet)
      Using the domain_set of the FlatField of an image (when one is available), extract the elements required.
      void setEastPositive(boolean value)
      set the sign of longitude convention.
      void setLatLonLimits(float latmin, float latmax, float lonmin, float lonmax)
      set the limits of Lats and Lons; without this, the getData() will return ALL the points in the file.
      void setLatLonLimits(java.awt.geom.Rectangle2D bbox)
      set the limits of Lats and Lons; without this, the getData() will return ALL the points in the file.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BaseMapAdapter

        public BaseMapAdapter(java.lang.String filename)
                       throws java.io.IOException,
                              VisADException
        Create a VisAD UnionSet from a local McIDAS Base Map file
        Parameters:
        filename - name of local file.
        Throws:
        java.io.IOException - if there was a problem reading the file.
        VisADException - if an unexpected problem occurs.
      • BaseMapAdapter

        public BaseMapAdapter(java.lang.String filename,
                              java.awt.geom.Rectangle2D bbox)
                       throws java.io.IOException,
                              VisADException
        Create a VisAD UnionSet from a McIDAS Base Map file on the Web
        Parameters:
        filename - name of local file.
        bbox - lat/lon bounding box of map lines to include
        Throws:
        java.io.IOException - if there was a problem reading the file.
        VisADException - if an unexpected problem occurs.
      • BaseMapAdapter

        public BaseMapAdapter(java.net.URL url)
                       throws java.io.IOException,
                              VisADException
        Create a VisAD UnionSet from a McIDAS Base Map file on the Web
        Parameters:
        url - URL & filename name of remote file
        Throws:
        java.io.IOException - if there was a problem reading the URL.
        VisADException - if an unexpected problem occurs.
      • BaseMapAdapter

        public BaseMapAdapter(java.net.URL url,
                              java.awt.geom.Rectangle2D bbox)
                       throws java.io.IOException,
                              VisADException
        Create a VisAD UnionSet from a McIDAS Base Map file on the Web
        Parameters:
        url - URL of remote file
        bbox - lat/lon bounding box of map lines to include
        Throws:
        java.io.IOException - if there was a problem reading the URL.
        VisADException - if an unexpected problem occurs.
      • BaseMapAdapter

        public BaseMapAdapter(java.io.InputStream is)
                       throws java.io.IOException,
                              VisADException
        Create a VisAD UnionSet from a McIDAS Base Map file inputstream
        Parameters:
        is - input stream of mapfile
        Throws:
        java.io.IOException - if there was a problem reading the inputstream
        VisADException - if an unexpected problem occurs.
      • BaseMapAdapter

        public BaseMapAdapter(java.io.InputStream is,
                              java.awt.geom.Rectangle2D bbox)
                       throws java.io.IOException,
                              VisADException
        Create a VisAD UnionSet from a McIDAS Base Map file inputstream
        Parameters:
        is - input stream of mapfile
        bbox - lat/lon bounding box
        Throws:
        java.io.IOException - if there was a problem reading the inputstream
        VisADException - if an unexpected problem occurs.
    • Method Detail

      • setLatLonLimits

        public void setLatLonLimits(java.awt.geom.Rectangle2D bbox)
        set the limits of Lats and Lons; without this, the getData() will return ALL the points in the file. When this method is used, the feature of the McIDAS map files that has the lat/lon extremes for each line segment will be used to coarsely cull points out of the returned VisAD UnionSet.

        This may be used along with any other domain-setting routine, but should be invoked last. Alternatively, pass in the bounding box in the constructor.

        Parameters:
        bbox - Rectangle2D representing the bounding box
      • setLatLonLimits

        public void setLatLonLimits(float latmin,
                                    float latmax,
                                    float lonmin,
                                    float lonmax)
        set the limits of Lats and Lons; without this, the getData() will return ALL the points in the file. When this method is used, the feature of the McIDAS map files that has the lat/lon extremes for each line segment will be used to coarsely cull points out of the returned VisAD UnionSet.

        This may be used along with any other domain-setting routine, but should be invoked last.

        Parameters:
        latmin - the minimum Latitude value
        latmax - the maximum Latitude value
        lonmin - the minimum Longitude value (-180 -- 180)
        lonmax - the maximum Longitude value
      • setDomainSet

        public void setDomainSet(Linear2DSet domainSet)
                          throws VisADException
        Using the domain_set of the FlatField of an image (when one is available), extract the elements required. This implies that a CoordinateSystem is available with a reference coordinate of Latitude,Longitude.
        Parameters:
        domainSet - The VisAD Linear2DSet domain_set used when the associated image FlatField was created
        Throws:
        VisADException - necessary VisAD object cannot be created
      • setCoordinateSystem

        public void setCoordinateSystem(CoordinateSystem cs,
                                        int numEles,
                                        int numLines,
                                        RealTupleType domain)
                                 throws VisADException
        Define a CoordinateSystem whose fromReference() will be used to transform points from latitude/longitude into element,line.
        Parameters:
        cs - is that
        numEles - is number of elements (x)
        numLines - is number of lines (y)
        domain - is the desired domain (ordered element, line)
        Throws:
        VisADException - a necessary VisAD object could not be created
      • doByLatLon

        public void doByLatLon()
        Set the MathType of the UnionSet to be lat/lon.
      • getData

        public UnionSet getData()
        getData creates a VisAD UnionSet type with the MathType specified thru one of the other methods. By default, the MathType is a RealTupleType of Latitude,Longitude, so the UnionSet (a union of Gridded2DSets) will have lat/lon values. Each Gridded2DSet is a line segment that is supposed to be drawn as a continuous line. This should only be called once after construction.
        Returns:
        UnionSet of maplines or null if there are no maplines in the domain of the display.
      • setEastPositive

        public void setEastPositive(boolean value)
        set the sign of longitude convention. By default, the longitudes are positive eastward
        Parameters:
        value - set to true for positive eastward, set to false for positive westward.
      • isEastPositive

        public boolean isEastPositive()
        determine what sign convention for longitude is currently being used.
        Returns:
        true if the convention is positive eastward; false if positive westward.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.