Documentation of 'visad.data.gis.ArcAsciiGridAdapter' Java class
ArcAsciiGridAdapter
visad.data.gis

Class ArcAsciiGridAdapter



  • public class ArcAsciiGridAdapter
    extends java.lang.Object
    AsciiArcGridAdapter converts an ASCII ArcGrid file into a VisAD Data object.
    • Constructor Summary

      Constructors 
      Constructor and Description
      ArcAsciiGridAdapter(java.lang.String filename)
      Create an ArcAsciiGridAdapter for the particular file.
      ArcAsciiGridAdapter(java.lang.String filename, RealTupleType spatialType)
      Create an ArcAsciiGridAdapter for the particular file and use the RealType specified for the data metadata.
      ArcAsciiGridAdapter(java.lang.String filename, RealTupleType spatialType, RealType dataType)
      Create an ArcAsciiGridAdapter for the particular file and use the RealType specified for the data metadata.
      ArcAsciiGridAdapter(java.lang.String filename, RealTupleType spatialType, RealType dataType, Unit dataUnit)
      Create an ArcAsciiGridAdapter for the particular file and use the supplied RealType for the data values, and units if different from default from RealType.
      ArcAsciiGridAdapter(java.lang.String filename, RealType dataType)
      Create an ArcAsciiGridAdapter for the particular file and use the RealType specified for the data metadata.
      ArcAsciiGridAdapter(java.lang.String filename, RealType dataType, Unit dataUnit)
      Create an ArcAsciiGridAdapter for the particular file and use the supplied RealType for the data values, and units if different from default from RealType.
      ArcAsciiGridAdapter(java.lang.String filename, java.lang.String dataName)
      Create an ArcAsciiGridAdapter for the particular file and use the supplied RealType for the data values, and units if different from default from RealType.
      ArcAsciiGridAdapter(java.lang.String filename, java.lang.String dataName, java.lang.String unitSpec)
      Create an ArcAsciiGridAdapter for the particular file and use the supplied RealType for the data values, and units if different from default from RealType.
      ArcAsciiGridAdapter(java.lang.String filename, Unit dataUnit)
      Create an ArcAsciiGridAdapter for the particular file and use units specified for the data.
    • Field Detail

      • DEFAULT_SPATIAL_TYPE

        public static final RealTupleType DEFAULT_SPATIAL_TYPE
        Default spatial type
      • DEFAULT_DATA_TYPE

        public static final RealType DEFAULT_DATA_TYPE
        Default data type
    • Constructor Detail

      • ArcAsciiGridAdapter

        public ArcAsciiGridAdapter(java.lang.String filename)
                            throws VisADException
        Create an ArcAsciiGridAdapter for the particular file. Data are assumed to be elevation values in meters
        Parameters:
        filename - name of file to read
        Throws:
        VisADException - couldn't create VisAD object
      • ArcAsciiGridAdapter

        public ArcAsciiGridAdapter(java.lang.String filename,
                                   RealType dataType)
                            throws VisADException
        Create an ArcAsciiGridAdapter for the particular file and use the RealType specified for the data metadata. Data are assumed to be in the default units of the RealType.
        Parameters:
        filename - name of file to read
        dataType - RealType to use for range units
        Throws:
        VisADException - couldn't create VisAD object
      • ArcAsciiGridAdapter

        public ArcAsciiGridAdapter(java.lang.String filename,
                                   RealTupleType spatialType)
                            throws VisADException
        Create an ArcAsciiGridAdapter for the particular file and use the RealType specified for the data metadata. Data are assumed to be in the default units of the RealType.
        Parameters:
        filename - name of file to read
        spatialType - RealTupleType to use for spatial domain
        Throws:
        VisADException - couldn't create VisAD object
      • ArcAsciiGridAdapter

        public ArcAsciiGridAdapter(java.lang.String filename,
                                   RealTupleType spatialType,
                                   RealType dataType)
                            throws VisADException
        Create an ArcAsciiGridAdapter for the particular file and use the RealType specified for the data metadata. Data are assumed to be in the default units of the RealType.
        Parameters:
        filename - name of file to read
        spatialType - RealTupleType to use for the spatial domain.
        dataType - RealType to use for range units
        Throws:
        VisADException - couldn't create VisAD object
      • ArcAsciiGridAdapter

        public ArcAsciiGridAdapter(java.lang.String filename,
                                   Unit dataUnit)
                            throws VisADException
        Create an ArcAsciiGridAdapter for the particular file and use units specified for the data. Data are assumed to be altitudes.
        Parameters:
        filename - name of file to read
        dataUnit - Unit of data
        Throws:
        VisADException - if unit is incompatible
      • ArcAsciiGridAdapter

        public ArcAsciiGridAdapter(java.lang.String filename,
                                   java.lang.String dataName)
                            throws VisADException
        Create an ArcAsciiGridAdapter for the particular file and use the supplied RealType for the data values, and units if different from default from RealType.
        Parameters:
        filename - name of file to read
        dataName - name to use for creating RealType
        Throws:
        VisADException - if unit is incompatible, or problem with file
      • ArcAsciiGridAdapter

        public ArcAsciiGridAdapter(java.lang.String filename,
                                   java.lang.String dataName,
                                   java.lang.String unitSpec)
                            throws VisADException
        Create an ArcAsciiGridAdapter for the particular file and use the supplied RealType for the data values, and units if different from default from RealType.
        Parameters:
        filename - name of file to read
        dataName - name for the data
        unitSpec - valid Unit specification
        Throws:
        VisADException - if unit is incompatible, or problem with file
      • ArcAsciiGridAdapter

        public ArcAsciiGridAdapter(java.lang.String filename,
                                   RealType dataType,
                                   Unit dataUnit)
                            throws VisADException
        Create an ArcAsciiGridAdapter for the particular file and use the supplied RealType for the data values, and units if different from default from RealType.
        Parameters:
        filename - name of file to read
        dataType - RealType to use for range units
        dataUnit - Unit of data if different from dataType default units.
        Throws:
        VisADException - if unit is incompatible, or problem with file
      • ArcAsciiGridAdapter

        public ArcAsciiGridAdapter(java.lang.String filename,
                                   RealTupleType spatialType,
                                   RealType dataType,
                                   Unit dataUnit)
                            throws VisADException
        Create an ArcAsciiGridAdapter for the particular file and use the supplied RealType for the data values, and units if different from default from RealType.
        Parameters:
        filename - name of file to read
        spatialType - RealTupleType to use for the spatial domain.
        dataType - RealType to use for range units
        dataUnit - Unit of data if different from dataType default units.
        Throws:
        VisADException - if unit is incompatible, or problem with file
    • Method Detail

      • getData

        public FieldImpl getData()
                          throws VisADException
        Get the ASCIIGRID as a VisAD data object
        Returns:
        a FlatField of type ((getSpatialType()) -> getDataType())
        Throws:
        VisADException
      • getData

        public FieldImpl getData(RealTupleType spatialType,
                                 RealType dataType)
                          throws VisADException
        Get the ASCIIGRID as a VisAD data object with the specified spatial domain and range.
        Parameters:
        spatialType - type for spatial domain
        dataType - type for range
        Returns:
        a FlatField of type ((spatialType) -> dataType)
        Throws:
        VisADException
      • getData

        public FieldImpl getData(MathType mathType)
                          throws VisADException
        Get the ASCIIGRID as a VisAD data object with the specified domain and range.
        Parameters:
        mathType - type to use. If it's a FunctionType, it defines the return objects function type. If it's a RealTupleType, it defines the domain type, if it's a RealType, it defines the data type.
        Returns:
        a FlatField based on mathType
        Throws:
        VisADException
      • getSpatialSet

        public Gridded2DSet getSpatialSet(RealTupleType spatialType)
                                   throws VisADException
        Get the spatial domain set for this ASCIIGRID with the specified type.
        Parameters:
        spatialType - RealTupleType (dimension 2) to use for this domain
        Returns:
        Gridded2DSet for spatial domain
        Throws:
        VisADException
      • getXLLCorner

        public float getXLLCorner()
        Get the x value of the lower left corner of the grid.
        Returns:
        x value of lower left corner.
      • getYLLCorner

        public float getYLLCorner()
        Get the y value of the lower left corner of the grid.
        Returns:
        y value of lower left corner.
      • getCellSize

        public float getCellSize()
        Deprecated. Use getCellSizeX and getCellSizeY
        Get the cell size of this grid
        Returns:
        cell size
      • getCellSizeX

        public float getCellSizeX()
        Get the cell size of this grid
        Returns:
        cell size
      • getCellSizeY

        public float getCellSizeY()
        Get the cell size of this grid
        Returns:
        cell size
      • getNoDataValue

        public float getNoDataValue()
        Get the missing data value for this grid
        Returns:
        missing data value (or NaN if not specified)
      • getRows

        public int getRows()
        Get the number of rows in this grid
        Returns:
        number of rows
      • getColumns

        public int getColumns()
        Get the number of columns in this grid
        Returns:
        number of columns
      • getSpatialType

        public RealTupleType getSpatialType()
        Get the spatial domain type.
        Returns:
        type of the spatial set.
      • setSpatialType

        public void setSpatialType(RealTupleType newSpatialType)
        Set the spatial domain type.
        Parameters:
        newSpatialType - new type for
      • setDataType

        public void setDataType(RealType newType)
        Set the range type.
        Parameters:
        newType - new type for range
      • getDataType

        public RealType getDataType()
        Get the type of the Data.
        Returns:
        type of the data
      • setDataUnit

        public void setDataUnit(Unit newUnit)
        Set the data units
        Parameters:
        newUnit - new units for data
      • getDataUnit

        public Unit getDataUnit()
        Get the data units
        Returns:
        units of the data
      • getBounds

        public java.awt.geom.Rectangle2D getBounds()
        Get the bounds of this grid
        Returns:
        bounds as a rectangle.
      • toString

        public java.lang.String toString()
        Return a string representation of this grid as constructed.
        Overrides:
        toString in class java.lang.Object
        Returns:
        String representation:
      • main

        public static void main(java.lang.String[] args)
                         throws java.lang.Exception
        test this class "java visad.data.gis.ArcAsciiGridAdpater "
        Throws:
        java.lang.Exception

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.