com.supermap.data

Class DatasetGridInfo

  • java.lang.Object
    • com.supermap.data.DatasetGridInfo


  • public class DatasetGridInfo
    extends java.lang.Object

    The grid dataset information class.

    This class contains the setting information of the grid dataset, including the dataset name, width, height, pixel format, encoding mode, tile size and NoData value, etc.

    • Constructor Summary

      Constructors 
      Constructor and Description
      DatasetGridInfo()
      Constructs a new DatasetGridInfo object.
      DatasetGridInfo(DatasetGridInfo datasetGridInfo)
      Constructs a new object identical to the given DatasetGridInfo object.
      DatasetGridInfo(java.lang.String name, DatasetGrid templateDataset)
      Creates a new DatasetGridInfo object according to the specified arguments.
      DatasetGridInfo(java.lang.String name, int width, int height, PixelFormat pixelFormat, EncodeType encodeType)
      Creates a new DatasetGridInfo object according to the specified arguments.
      DatasetGridInfo(java.lang.String name, int width, int height, PixelFormat pixelFormat, EncodeType encodeType, int blockSize)
      Creates a new DatasetGridInfo object according to the specified arguments.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void dispose()
      Release the resource occupy by this object.
      int getBlockSize()
      Returns the size of the block for storing with the specified pixels in grid dataset, and pixel is the unit.
      Rectangle2D getBounds()
      Returns the bounds of the grid dataset.
      EncodeType getEncodeType()
      Returns the encoding type of this dataset.
      int getHeight()
      Returns the height of the grid of the DatasetGrid.
      double getMaxValue()
      Returns the maximum in the grid ranks of raster dataset.
      double getMinValue()
      Returns the minimum in the grid ranks of raster dataset.
      java.lang.String getName()
      Returns the name of the DatasetGridInfo class.
      double getNoValue()
      Returns the empty value of the grid dataset.
      PixelFormat getPixelFormat()
      Returns the pixel format of the grid dataset.
      int getWidth()
      Returns the width of the grid data.
      void setBlockSize(int value)
      Sets the size of the block for storing with the specified pixels in grid dataset, and pixel is the unit.
      void setBounds(Rectangle2D value)
      Sets the bounds of the grid dataset.
      void setEncodeType(EncodeType value)
      Sets the encoding type of this dataset.
      void setHeight(int value)
      Sets the height of the grid in grid dataset and the unit is pixel.
      void setMaxValue(double value)
      Sets the maximum in the grid ranks of raster dataset.
      void setMinValue(double value)
      Sets the minimum in the grid ranks of raster dataset.
      void setName(java.lang.String value)
      Sets the name of the DatasetGridInfo.
      void setNoValue(double value)
      Sets the empty value of the grid dataset.
      void setPixelFormat(PixelFormat value)
      Sets the pixel format of the grid dataset.
      void setWidth(int value)
      Sets the width of the grid in grid dataset and the unit is pixel.
      java.lang.String toString()
      Returns a string that indicates the current DatasetGridInfo in the format of {{Name=,Bounds={}, Width=,Height=,PixelFormat=,BlockSize=,EncodeType=,NoValue=,MinValue=,MaxValue=}.
      • Methods inherited from class java.lang.Object

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

      • DatasetGridInfo

        public DatasetGridInfo()
        Constructs a new DatasetGridInfo object.
      • DatasetGridInfo

        public DatasetGridInfo(DatasetGridInfo datasetGridInfo)
        Constructs a new object identical to the given DatasetGridInfo object.
        Parameters:
        datasetGridInfo - used to construct a new instance of the datasetGridInfo object.
      • DatasetGridInfo

        public DatasetGridInfo(java.lang.String name,
                               int width,
                               int height,
                               PixelFormat pixelFormat,
                               EncodeType encodeType)
        Creates a new DatasetGridInfo object according to the specified arguments.
        Parameters:
        name - The specified name of the grid dataset.
        width - The specified width of the grid dataset.
        height - The height of the grid dataset.
        pixelFormat - The specified pixel format of the grid dataset.
        encodeType - The specified encode type of the grid dataset.
      • DatasetGridInfo

        public DatasetGridInfo(java.lang.String name,
                               int width,
                               int height,
                               PixelFormat pixelFormat,
                               EncodeType encodeType,
                               int blockSize)
        Creates a new DatasetGridInfo object according to the specified arguments.
        Parameters:
        name - The specified name of the grid dataset.
        width - The specified width of the grid dataset.
        height - The height of the grid dataset.
        pixelFormat - The specified pixel format of the grid dataset.
        encodeType - The specified encode type of the grid dataset.
        blockSize - The specified block size of the grid dataset.
      • DatasetGridInfo

        public DatasetGridInfo(java.lang.String name,
                               DatasetGrid templateDataset)
        Creates a new DatasetGridInfo object according to the specified arguments.
        Parameters:
        name - the specified name
        templateDataset - the specified template datasets.
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the name of the DatasetGridInfo class.
        Returns:
        the name of the DatasetGridInfo class.
        Default:
        the default value is "UntitledDatasetGrid".
      • setName

        public void setName(java.lang.String value)
        Sets the name of the DatasetGridInfo.
        Parameters:
        value - the name of the DatasetGridInfo class.
      • getBounds

        public Rectangle2D getBounds()
        Returns the bounds of the grid dataset.
        Returns:
        the bounds of the grid dataset.
        Default:
        The bounds is a rectangle and the default is (0,0,255,255). That is the rectangle with x-coordinate of the left edge, y-coordinate of the bottom edge, x-coordinate of the right edge and y-coordinate of the top edge.
      • setBounds

        public void setBounds(Rectangle2D value)
        Sets the bounds of the grid dataset.
        Parameters:
        value - the bounds of the grid dataset.
      • getWidth

        public int getWidth()
        Returns the width of the grid data. The unit is pixel.
        Returns:
        the width of the raster in the grid data.
        Default:
        The default value is 256 pixels.
      • setWidth

        public void setWidth(int value)
        Sets the width of the grid in grid dataset and the unit is pixel. The unit is pixels.
        Parameters:
        value - the width of the raster in the grid data.
      • getHeight

        public int getHeight()
        Returns the height of the grid of the DatasetGrid. The unit is pixel.
        Returns:
        the height of the raster in the grid data.
        Default:
        The default value is 256 pixels.
      • setHeight

        public void setHeight(int value)
        Sets the height of the grid in grid dataset and the unit is pixel. The unit is pixels.
        Parameters:
        value - the height of the raster in the grid data.
      • getPixelFormat

        public PixelFormat getPixelFormat()
        Returns the pixel format of the grid dataset. The pixel can be expressed with the byte, bit is the unit. For more information, please refer to the PixelFormat class.

        The DatasetGridInfo object can not support the three pixel formats such as UBIT24, BIT32 and BIT64.

        Returns:
        the specified pixel format of the grid data.
        See Also:
        PixelFormat
        Default:
        The default value is DOUBLE type.
      • setPixelFormat

        public void setPixelFormat(PixelFormat value)
        Sets the pixel format of the grid dataset. The pixel can be expressed with the byte, bit is the unit. For more information, please refer to the PixelFormat class.

        The DatasetGridInfo object can not support the three pixel formats such as UBIT24, BIT32 and BIT64.

        Parameters:
        value - the specified pixel format of the grid data.
        See Also:
        PixelFormat
      • getBlockSize

        public int getBlockSize()
        Returns the size of the block for storing with the specified pixels in grid dataset, and pixel is the unit. The default value is 128 pixel. The blocking mode is stored the block as the square, for instance, blocking the square with 4*4 pixel, the grid data will be blocked the matrix with 3 rows and 3 columns. Where,if the image or grid data has not enough pixel to be blocked, so using the empty grid to make up for the block.

        Returns:
        the specified block size of the grid dataset.
        Default:
        The default value is 128 pixels.
      • setBlockSize

        public void setBlockSize(int value)
        Sets the size of the block for storing with the specified pixels in grid dataset, and pixel is the unit. The default value is 128. The blocking mode is stored the block as the square, for instance, blocking the square with 4*4 pixel, the grid data will be blocked the matrix with 3 rows and 3 columns. Where,if the image or grid data has not enough pixel to be blocked, so using the empty grid to make up for the block.

        Parameters:
        value - the specified block size of the grid dataset.
      • getEncodeType

        public EncodeType getEncodeType()
        Returns the encoding type of this dataset. Using a encoding for a dataset can reduce the space used to store the grid dataset, decrease the load of the net or the load of the server. The encoding type for the vector dataset can be Byte, Int16, Int24 and Int32, SGL,LZW,DCT, or you can choose not to encode or compress this dataset, which is None. The encoding type of the raster dataset can be DCT, SGL, LZW or None, which means do not compress the data.For more information, please refer to the EncodeType type.

        For some encode types, SuperMap Objects .NET may automatically change it to a more suitable encode type for the dataset.

        Returns:
        The encoding type of the raster dataset.
        See Also:
        EncodeType
        Default:
        The default value is NONE type.
      • setEncodeType

        public void setEncodeType(EncodeType value)
        Sets the encoding type of this dataset. Using a encoding for a dataset can reduce the space used to store the grid dataset, decrease the load of the net or the load of the server. The encoding type for the vector dataset can be Byte, Int16, Int24 and Int32, SGL,LZW,DCT, or you can choose not to encode or compress this dataset, which is None. The encoding type of the raster dataset can be DCT, SGL, LZW or None, which means do not compress the data.For more information, please refer to the EncodeType type.

        For some encode types, SuperMap Objects .NET may automatically change it to a more suitable encode type for the dataset.

        Parameters:
        value - The encoding type of the raster dataset.
        See Also:
        EncodeType
      • getNoValue

        public double getNoValue()
        Returns the empty value of the grid dataset. When the empty value exists in the grid dataset, user can use -9999 to express the empty value.
        Returns:
        The null value of raster dataset.
        Default:
        The default value is -9999.
      • setNoValue

        public void setNoValue(double value)
        Sets the empty value of the grid dataset. When the empty value exists in the grid dataset, user can use -9999 to express the empty value.
        Parameters:
        value - The null value of raster dataset.
      • getMinValue

        public double getMinValue()
        Returns the minimum in the grid ranks of raster dataset.
        Returns:
        The minimum in the grid ranks of raster dataset.
        Default:
        The default value is 0.
      • setMinValue

        public void setMinValue(double value)
        Sets the minimum in the grid ranks of raster dataset.
        Parameters:
        value - The minimum in the grid ranks of raster dataset.
      • getMaxValue

        public double getMaxValue()
        Returns the maximum in the grid ranks of raster dataset.
        Returns:
        The maximum in the grid ranks of raster dataset.
        Default:
        The default value is 0.
      • setMaxValue

        public void setMaxValue(double value)
        Sets the maximum in the grid ranks of raster dataset.
        Parameters:
        value - The maximum in the grid ranks of raster dataset.
      • toString

        public java.lang.String toString()
        Returns a string that indicates the current DatasetGridInfo in the format of {{Name=,Bounds={}, Width=,Height=,PixelFormat=,BlockSize=,EncodeType=,NoValue=,MinValue=,MaxValue=}.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string that indicates the current DatasetGridInfo.
      • dispose

        public void dispose()
        Release the resource occupy by this object. The object could not be used after call this method.