Package org.gdal.gdal

Class Dataset


  • public class Dataset
    extends MajorObject
    Class Dataset is an uninstanciable class providing various methods to access a set of associated raster bands, usually from one file.

    The Dataset class is a binding for the C++ GDALDataset class.

    A dataset encapsulating one or more raster bands. Details are further discussed in the GDAL Data Model.

    Dataset objects are returned by methods from other classes, such as gdal.Open() or Driver.Create() / Driver.CreateCopy()

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int AbortSQL()  
      int AddBand()
      Add a band to a dataset.
      int AddBand​(int datatype)
      Add a band to a dataset.
      int AddBand​(int datatype, java.util.Vector options)
      Add a band to a dataset.
      boolean AddFieldDomain​(FieldDomain fieldDomain)  
      boolean AddRelationship​(Relationship relationship)  
      int AdviseRead​(int xoff, int yoff, int xsize, int ysize)  
      int AdviseRead​(int xoff, int yoff, int xsize, int ysize, SWIGTYPE_p_int buf_xsize)  
      int AdviseRead​(int xoff, int yoff, int xsize, int ysize, SWIGTYPE_p_int buf_xsize, SWIGTYPE_p_int buf_ysize)  
      int AdviseRead​(int xoff, int yoff, int xsize, int ysize, SWIGTYPE_p_int buf_xsize, SWIGTYPE_p_int buf_ysize, SWIGTYPE_p_int buf_type)  
      int AdviseRead​(int xoff, int yoff, int xsize, int ysize, SWIGTYPE_p_int buf_xsize, SWIGTYPE_p_int buf_ysize, SWIGTYPE_p_int buf_type, int[] band_list)  
      int AdviseRead​(int xoff, int yoff, int xsize, int ysize, SWIGTYPE_p_int buf_xsize, SWIGTYPE_p_int buf_ysize, SWIGTYPE_p_int buf_type, int[] band_list, java.util.Vector options)  
      int BuildOverviews​(int[] overviewlist)
      Build raster overview(s).
      int BuildOverviews​(int[] overviewlist, ProgressCallback callback)
      Build raster overview(s).
      int BuildOverviews​(java.lang.String resampling, int[] overviewlist)
      Build raster overview(s).
      int BuildOverviews​(java.lang.String resampling, int[] overviewlist, ProgressCallback callback)
      Build raster overview(s).
      int BuildOverviews​(java.lang.String resampling, int[] overviewlist, ProgressCallback callback, java.util.Vector options)  
      void ClearStatistics()  
      int CommitTransaction()  
      Layer CopyLayer​(Layer src_layer, java.lang.String new_name)  
      Layer CopyLayer​(Layer src_layer, java.lang.String new_name, java.util.Vector options)  
      Layer CreateLayer​(java.lang.String name)  
      Layer CreateLayer​(java.lang.String name, SpatialReference srs)  
      Layer CreateLayer​(java.lang.String name, SpatialReference srs, int geom_type)  
      Layer CreateLayer​(java.lang.String name, SpatialReference srs, int geom_type, java.util.Vector options)  
      int CreateMaskBand​(int nFlags)
      Adds a mask band to the current band.
      void delete()
      Frees the native resource associated to a Dataset object and close the file.
      boolean DeleteFieldDomain​(java.lang.String name)  
      int DeleteLayer​(int index)  
      boolean DeleteRelationship​(java.lang.String name)  
      Layer ExecuteSQL​(java.lang.String statement)  
      Layer ExecuteSQL​(java.lang.String statement, Geometry spatialFilter)  
      Layer ExecuteSQL​(java.lang.String statement, Geometry spatialFilter, java.lang.String dialect)  
      void FlushCache()
      Flush all write cached data to disk.
      Driver GetDriver()
      Fetch the driver to which this dataset relates.
      FieldDomain GetFieldDomain​(java.lang.String name)  
      java.util.Vector GetFieldDomainNames()  
      java.util.Vector GetFieldDomainNames​(java.util.Vector options)  
      java.util.Vector GetFileList()
      Fetch files forming dataset.
      int GetGCPCount()
      Get number of GCPs.
      java.lang.String GetGCPProjection()
      Get output projection for GCPs.
      java.util.Vector GetGCPs()
      Fetch GCPs.
      void GetGCPs​(java.util.Vector gcpVector)
      Fetch GCPs.
      SpatialReference GetGCPSpatialRef()  
      double[] GetGeoTransform()
      Fetch the affine transformation coefficients.
      void GetGeoTransform​(double[] geoTransformArray)
      Fetch the affine transformation coefficients.
      Layer GetLayer​(int index)  
      Layer GetLayer​(java.lang.String layerName)  
      Layer GetLayerByIndex​(int index)  
      Layer GetLayerByName​(java.lang.String layer_name)  
      int GetLayerCount()  
      Feature GetNextFeature()  
      java.lang.String GetProjection()
      Fetch the projection definition string for this dataset.
      java.lang.String GetProjectionRef()
      Fetch the projection definition string for this dataset.
      Band GetRasterBand​(int nBandId)
      Fetch a band object for a dataset.
      int getRasterCount()
      Fetch the number of raster bands on this dataset.
      int GetRasterCount()
      Fetch the number of raster bands on this dataset.
      int getRasterXSize()
      Fetch raster width in pixels.
      int GetRasterXSize()
      Fetch raster width in pixels.
      int getRasterYSize()
      Fetch raster height in pixels.
      int GetRasterYSize()
      Fetch raster height in pixels.
      Relationship GetRelationship​(java.lang.String name)  
      java.util.Vector GetRelationshipNames()  
      java.util.Vector GetRelationshipNames​(java.util.Vector options)  
      Group GetRootGroup()  
      SpatialReference GetSpatialRef()  
      StyleTable GetStyleTable()  
      boolean IsLayerPrivate​(int index)  
      int ReadRaster​(int xoff, int yoff, int xsize, int ysize, int buf_xsize, int buf_ysize, int buf_type, byte[] array, int[] band_list)
      Read a region of image data from multiple bands.
      int ReadRaster​(int xoff, int yoff, int xsize, int ysize, int buf_xsize, int buf_ysize, int buf_type, byte[] array, int[] band_list, int nPixelSpace, int nLineSpace, int nBandSpace)
      Read a region of image data from multiple bands.
      int ReadRaster​(int xoff, int yoff, int xsize, int ysize, int buf_xsize, int buf_ysize, int buf_type, double[] array, int[] band_list)
      Read a region of image data from multiple bands.
      int ReadRaster​(int xoff, int yoff, int xsize, int ysize, int buf_xsize, int buf_ysize, int buf_type, double[] array, int[] band_list, int nPixelSpace, int nLineSpace, int nBandSpace)
      Read a region of image data from multiple bands.
      int ReadRaster​(int xoff, int yoff, int xsize, int ysize, int buf_xsize, int buf_ysize, int buf_type, float[] array, int[] band_list)
      Read a region of image data from multiple bands.
      int ReadRaster​(int xoff, int yoff, int xsize, int ysize, int buf_xsize, int buf_ysize, int buf_type, float[] array, int[] band_list, int nPixelSpace, int nLineSpace, int nBandSpace)
      Read a region of image data from multiple bands.
      int ReadRaster​(int xoff, int yoff, int xsize, int ysize, int buf_xsize, int buf_ysize, int buf_type, int[] array, int[] band_list)
      Read a region of image data from multiple bands.
      int ReadRaster​(int xoff, int yoff, int xsize, int ysize, int buf_xsize, int buf_ysize, int buf_type, int[] array, int[] band_list, int nPixelSpace, int nLineSpace, int nBandSpace)
      Read a region of image data from multiple bands.
      int ReadRaster​(int xoff, int yoff, int xsize, int ysize, int buf_xsize, int buf_ysize, int buf_type, short[] array, int[] band_list)
      Read a region of image data from multiple bands.
      int ReadRaster​(int xoff, int yoff, int xsize, int ysize, int buf_xsize, int buf_ysize, int buf_type, short[] array, int[] band_list, int nPixelSpace, int nLineSpace, int nBandSpace)
      Read a region of image data from multiple bands.
      int ReadRaster_Direct​(int xoff, int yoff, int xsize, int ysize, int buf_xsize, int buf_ysize, int buf_type, java.nio.ByteBuffer nioBuffer, int[] band_list)
      Read a region of image data from multiple bands.
      int ReadRaster_Direct​(int xoff, int yoff, int xsize, int ysize, int buf_xsize, int buf_ysize, int buf_type, java.nio.ByteBuffer nioBuffer, int[] band_list, int nPixelSpace, int nLineSpace, int nBandSpace)
      Read a region of image data from multiple bands.
      void ReleaseResultSet​(Layer layer)  
      void ResetReading()  
      int RollbackTransaction()  
      int SetGCPs​(GCP[] gcpArray, java.lang.String GCPProjection)
      Assign GCPs.
      int SetGCPs2​(GCP[] nGCPs, SpatialReference hSRS)  
      int SetGeoTransform​(double[] geoTransformArray)
      Set the affine transformation coefficients.
      int SetProjection​(java.lang.String projection)
      Set the projection reference string for this dataset.
      int SetSpatialRef​(SpatialReference srs)  
      void SetStyleTable​(StyleTable table)  
      int StartTransaction()  
      int StartTransaction​(int force)  
      boolean TestCapability​(java.lang.String cap)  
      boolean UpdateFieldDomain​(FieldDomain fieldDomain)  
      boolean UpdateRelationship​(Relationship relationship)  
      int WriteRaster​(int xoff, int yoff, int xsize, int ysize, int buf_xsize, int buf_ysize, int buf_type, byte[] array, int[] band_list)
      Write a region of image data from multiple bands.
      int WriteRaster​(int xoff, int yoff, int xsize, int ysize, int buf_xsize, int buf_ysize, int buf_type, byte[] array, int[] band_list, int nPixelSpace, int nLineSpace, int nBandSpace)
      Write a region of image data from multiple bands.
      int WriteRaster​(int xoff, int yoff, int xsize, int ysize, int buf_xsize, int buf_ysize, int buf_type, double[] array, int[] band_list)
      Write a region of image data from multiple bands.
      int WriteRaster​(int xoff, int yoff, int xsize, int ysize, int buf_xsize, int buf_ysize, int buf_type, double[] array, int[] band_list, int nPixelSpace, int nLineSpace, int nBandSpace)
      Write a region of image data from multiple bands.
      int WriteRaster​(int xoff, int yoff, int xsize, int ysize, int buf_xsize, int buf_ysize, int buf_type, float[] array, int[] band_list)
      Write a region of image data from multiple bands.
      int WriteRaster​(int xoff, int yoff, int xsize, int ysize, int buf_xsize, int buf_ysize, int buf_type, float[] array, int[] band_list, int nPixelSpace, int nLineSpace, int nBandSpace)
      Write a region of image data from multiple bands.
      int WriteRaster​(int xoff, int yoff, int xsize, int ysize, int buf_xsize, int buf_ysize, int buf_type, int[] array, int[] band_list)
      Write a region of image data from multiple bands.
      int WriteRaster​(int xoff, int yoff, int xsize, int ysize, int buf_xsize, int buf_ysize, int buf_type, int[] array, int[] band_list, int nPixelSpace, int nLineSpace, int nBandSpace)
      Write a region of image data from multiple bands.
      int WriteRaster​(int xoff, int yoff, int xsize, int ysize, int buf_xsize, int buf_ysize, int buf_type, short[] array, int[] band_list)
      Write a region of image data from multiple bands.
      int WriteRaster​(int xoff, int yoff, int xsize, int ysize, int buf_xsize, int buf_ysize, int buf_type, short[] array, int[] band_list, int nPixelSpace, int nLineSpace, int nBandSpace)
      Write a region of image data from multiple bands.
      int WriteRaster_Direct​(int xoff, int yoff, int xsize, int ysize, int buf_xsize, int buf_ysize, int buf_type, java.nio.ByteBuffer nioBuffer, int[] band_list)
      Write a region of image data from multiple bands.
      int WriteRaster_Direct​(int xoff, int yoff, int xsize, int ysize, int buf_xsize, int buf_ysize, int buf_type, java.nio.ByteBuffer nioBuffer, int[] band_list, int nPixelSpace, int nLineSpace, int nBandSpace)
      Write a region of image data from multiple bands.
      • Methods inherited from class java.lang.Object

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

      • delete

        public void delete()
        Frees the native resource associated to a Dataset object and close the file.

        This method will delete the underlying C++ object. After it has been called, all native resources will have been destroyed, so it will be illegal (and likely to cause JVM crashes) to use any method on this object or any derived objects, such as Band objects of this Dataset.

        The delete() method must be called when a dataset has been opened in update or creation mode, otherwise data might not be properly flushed to the disk. You cannot rely on the finalization to call delete().

        Overrides:
        delete in class MajorObject
      • GetRasterXSize

        public int GetRasterXSize()
        Fetch raster width in pixels.
        Returns:
        the width in pixels of raster bands in this Dataset.
        Since:
        Java bindings 1.7.0
      • GetRasterYSize

        public int GetRasterYSize()
        Fetch raster height in pixels.
        Returns:
        the height in pixels of raster bands in this Dataset.
        Since:
        Java bindings 1.7.0
      • GetRasterCount

        public int GetRasterCount()
        Fetch the number of raster bands on this dataset.
        Returns:
        the number of raster bands.
        Since:
        Java bindings 1.7.0
      • GetGCPs

        public java.util.Vector GetGCPs()
        Fetch GCPs.
        Returns:
        a vector of GCP objects
        Since:
        Java bindings 1.7.0
      • GetLayer

        public Layer GetLayer​(int index)
      • GetLayer

        public Layer GetLayer​(java.lang.String layerName)
      • getRasterXSize

        public int getRasterXSize()
        Fetch raster width in pixels.
        Returns:
        the width in pixels of raster bands in this Dataset.
      • getRasterYSize

        public int getRasterYSize()
        Fetch raster height in pixels.
        Returns:
        the height in pixels of raster bands in this Dataset.
      • getRasterCount

        public int getRasterCount()
        Fetch the number of raster bands on this dataset.
        Returns:
        the number of raster bands.
      • GetDriver

        public Driver GetDriver()
        Fetch the driver to which this dataset relates.
        Returns:
        the driver on which the dataset was created with gdal.Open() or Driver.Create().
      • GetRasterBand

        public Band GetRasterBand​(int nBandId)
        Fetch a band object for a dataset.
        Parameters:
        nBandId - the index number of the band to fetch, from 1 to GetRasterCount().
        Returns:
        the nBandId th band object
      • GetRootGroup

        public Group GetRootGroup()
      • GetProjection

        public java.lang.String GetProjection()
        Fetch the projection definition string for this dataset.

        The returned string defines the projection coordinate system of the image in OpenGIS WKT format. It should be suitable for use with the OGRSpatialReference class.

        When a projection definition is not available an empty (but not null) string is returned.

        Returns:
        the projection string.
        See Also:
        OSR tutorial
      • GetProjectionRef

        public java.lang.String GetProjectionRef()
        Fetch the projection definition string for this dataset.

        The returned string defines the projection coordinate system of the image in OpenGIS WKT format. It should be suitable for use with the OGRSpatialReference class.

        When a projection definition is not available an empty (but not null) string is returned.

        Returns:
        the projection string.
        See Also:
        OSR tutorial
      • SetProjection

        public int SetProjection​(java.lang.String projection)
        Set the projection reference string for this dataset.

        The string should be in OGC WKT or PROJ.4 format. An error may occur because of incorrectly specified projection strings, because the dataset is not writable, or because the dataset does not support the indicated projection. Many formats do not support writing projections.

        Parameters:
        projection - projection reference string.
        Returns:
        gdalconst.CE_Failure if an error occurs, otherwise gdalconst.CE_None.
      • GetGeoTransform

        public void GetGeoTransform​(double[] geoTransformArray)
        Fetch the affine transformation coefficients.

        Fetches the coefficients for transforming between pixel/line (P,L) raster space, and projection coordinates (Xp,Yp) space.

           Xp = geoTransformArray[0] + P*geoTransformArray[1] + L*geoTransformArray[2];
           Yp = geoTransformArray[3] + P*geoTransformArray[4] + L*geoTransformArray[5];
         

        In a north up image, geoTransformArray[1] is the pixel width, and geoTransformArray[5] is the pixel height. The upper left corner of the upper left pixel is at position (geoTransformArray[0],geoTransformArray[3]).

        The default transform is (0,1,0,0,0,1) and should be returned even when an error occurs, such as for formats that don't support transformation to projection coordinates.

        NOTE: GetGeoTransform() isn't expressive enough to handle the variety of OGC Grid Coverages pixel/line to projection transformation schemes. Eventually this method will be depreciated in favour of a more general scheme.

        Parameters:
        geoTransformArray - an existing six double array into which the transformation will be placed.
        See Also:
        gdal.ApplyGeoTransform(double[] padfGeoTransform, double dfPixel, double dfLine, double[] pdfGeoX, double[] pdfGeoY), gdal.InvGeoTransform(double[] gt_in)
      • SetGeoTransform

        public int SetGeoTransform​(double[] geoTransformArray)
        Set the affine transformation coefficients.

        See #GetGeoTransform() for details on the meaning of the geoTransformArray coefficients.

        Parameters:
        geoTransformArray - a six double array containing the transformation coefficients to be written with the dataset.
        Returns:
        gdalconst.CE_None on success, or gdalconst.CE_Failure if this transform cannot be written.
        See Also:
        GetGeoTransform(double[] geoTransformArray)
      • BuildOverviews

        public int BuildOverviews​(java.lang.String resampling,
                                  int[] overviewlist,
                                  ProgressCallback callback,
                                  java.util.Vector options)
      • BuildOverviews

        public int BuildOverviews​(java.lang.String resampling,
                                  int[] overviewlist,
                                  ProgressCallback callback)
        Build raster overview(s).

        If the operation is unsupported for the indicated dataset, then gdalconst.CE_Failure is returned, and gdal.GetLastErrorNo() will return gdalconst.CPLE_NotSupported.

        For example, to build overview level 2, 4 and 8 on all bands the following call could be made:

           ds.BuildOverviews( "NEAREST", new int[] { 2, 4, 8 }, null );
         
        Parameters:
        resampling - one of "NEAREST", "GAUSS", "AVERAGE", "AVERAGE_MAGPHASE" or "NONE" controlling the downsampling method applied.
        overviewlist - the list of overview decimation factors to build.
        callback - for reporting progress or null
        Returns:
        gdalconst.CE_None on success or gdalconst.CE_Failure if the operation doesn't work.
        Since:
        Java bindings 1.7.0
        See Also:
        gdal.RegenerateOverviews(Band srcBand, Band[] overviewBands, String resampling, ProgressCallback callback)
      • GetGCPCount

        public int GetGCPCount()
        Get number of GCPs.
        Returns:
        number of GCPs for this dataset. Zero if there are none.
      • GetGCPProjection

        public java.lang.String GetGCPProjection()
        Get output projection for GCPs.

        The projection string follows the normal rules from GetProjectionRef().

        Returns:
        projection string or "" if there are no GCPs.
      • GetGCPs

        public void GetGCPs​(java.util.Vector gcpVector)
        Fetch GCPs.

        Add to the provided vector the GCPs of the dataset

        Parameters:
        gcpVector - non null Vector object
      • SetGCPs

        public int SetGCPs​(GCP[] gcpArray,
                           java.lang.String GCPProjection)
        Assign GCPs.

        This method assigns the passed set of GCPs to this dataset, as well as setting their coordinate system. Internally copies are made of the coordinate system and list of points, so the caller remains responsible for deallocating these arguments if appropriate.

        Most formats do not support setting of GCPs, even formats that can handle GCPs. These formats will return CE_Failure.

        Parameters:
        gcpArray - array of GCP objects being assigned
        GCPProjection - the new OGC WKT coordinate system to assign for the GCP output coordinates. This parameter should be "" if no output coordinate system is known.
        Returns:
        gdalconst.CE_None on success, gdalconst.CE_Failure on failure (including if action is not supported for this format).
        Since:
        Java bindings 1.7.0
      • FlushCache

        public void FlushCache()
        Flush all write cached data to disk.

        Any raster (or other GDAL) data written via GDAL calls, but buffered internally will be written to disk.

        Calling this method is generally not sufficient to ensure that the file is in a consistent state. You must call delete() for that

        See Also:
        delete()
      • AddBand

        public int AddBand​(int datatype,
                           java.util.Vector options)
        Add a band to a dataset.

        This method will add a new band to the dataset if the underlying format supports this action. Except VRT and MEM drivers, most formats do not.

        Note that the new Band object is not returned. It may be fetched after successful completion of the method by calling ds.GetRasterBand(ds.GetRasterCount()) as the newest band will always be the last band.

        Parameters:
        datatype - the data type of the pixels in the new band.
        options - a vector of options strings, each being "NAME=VALUE". The supported options are format specific. null may be passed by default.
        Returns:
        gdalconst.CE_None on success or gdalconst.CE_Failure on failure.
      • CreateMaskBand

        public int CreateMaskBand​(int nFlags)
        Adds a mask band to the current band.

        The default implementation of the CreateMaskBand() method is implemented based on similar rules to the .ovr handling implemented using the GDALDefaultOverviews object. A TIFF file with the extension .msk will be created with the same basename as the original file, and it will have as many bands as the original image (or just one for GMF_PER_DATASET). The mask images will be deflate compressed tiled images with the same block size as the original image if possible.

        Returns:
        gdalconst.CE_None on success or gdalconst.CE_Failure on an error.
        Since:
        GDAL 1.5.0
        See Also:
        RFC 15 - No data bit mask
      • GetFileList

        public java.util.Vector GetFileList()
        Fetch files forming dataset.

        Returns a list of files believed to be part of this dataset. If it returns an empty list of files it means there is believed to be no local file system files associated with the dataset (for instance a virtual dataset).

        The returned filenames will normally be relative or absolute paths depending on the path used to originally open the dataset.

        Returns:
        null or a vector of strings of file names.
      • AdviseRead

        public int AdviseRead​(int xoff,
                              int yoff,
                              int xsize,
                              int ysize,
                              SWIGTYPE_p_int buf_xsize,
                              SWIGTYPE_p_int buf_ysize,
                              SWIGTYPE_p_int buf_type,
                              int[] band_list,
                              java.util.Vector options)
      • AdviseRead

        public int AdviseRead​(int xoff,
                              int yoff,
                              int xsize,
                              int ysize,
                              SWIGTYPE_p_int buf_xsize)
      • AdviseRead

        public int AdviseRead​(int xoff,
                              int yoff,
                              int xsize,
                              int ysize)
      • CreateLayer

        public Layer CreateLayer​(java.lang.String name,
                                 SpatialReference srs,
                                 int geom_type,
                                 java.util.Vector options)
      • CreateLayer

        public Layer CreateLayer​(java.lang.String name,
                                 SpatialReference srs,
                                 int geom_type)
      • CreateLayer

        public Layer CreateLayer​(java.lang.String name)
      • CopyLayer

        public Layer CopyLayer​(Layer src_layer,
                               java.lang.String new_name,
                               java.util.Vector options)
      • CopyLayer

        public Layer CopyLayer​(Layer src_layer,
                               java.lang.String new_name)
      • DeleteLayer

        public int DeleteLayer​(int index)
      • GetLayerCount

        public int GetLayerCount()
      • IsLayerPrivate

        public boolean IsLayerPrivate​(int index)
      • GetLayerByIndex

        public Layer GetLayerByIndex​(int index)
      • GetLayerByName

        public Layer GetLayerByName​(java.lang.String layer_name)
      • ResetReading

        public void ResetReading()
      • GetNextFeature

        public Feature GetNextFeature()
      • TestCapability

        public boolean TestCapability​(java.lang.String cap)
      • ExecuteSQL

        public Layer ExecuteSQL​(java.lang.String statement,
                                Geometry spatialFilter,
                                java.lang.String dialect)
      • ExecuteSQL

        public Layer ExecuteSQL​(java.lang.String statement,
                                Geometry spatialFilter)
      • ExecuteSQL

        public Layer ExecuteSQL​(java.lang.String statement)
      • ReleaseResultSet

        public void ReleaseResultSet​(Layer layer)
      • GetStyleTable

        public StyleTable GetStyleTable()
      • SetStyleTable

        public void SetStyleTable​(StyleTable table)
      • AbortSQL

        public int AbortSQL()
      • StartTransaction

        public int StartTransaction​(int force)
      • StartTransaction

        public int StartTransaction()
      • CommitTransaction

        public int CommitTransaction()
      • RollbackTransaction

        public int RollbackTransaction()
      • ClearStatistics

        public void ClearStatistics()
      • GetFieldDomainNames

        public java.util.Vector GetFieldDomainNames​(java.util.Vector options)
      • GetFieldDomainNames

        public java.util.Vector GetFieldDomainNames()
      • GetFieldDomain

        public FieldDomain GetFieldDomain​(java.lang.String name)
      • AddFieldDomain

        public boolean AddFieldDomain​(FieldDomain fieldDomain)
      • DeleteFieldDomain

        public boolean DeleteFieldDomain​(java.lang.String name)
      • UpdateFieldDomain

        public boolean UpdateFieldDomain​(FieldDomain fieldDomain)
      • GetRelationshipNames

        public java.util.Vector GetRelationshipNames​(java.util.Vector options)
      • GetRelationshipNames

        public java.util.Vector GetRelationshipNames()
      • GetRelationship

        public Relationship GetRelationship​(java.lang.String name)
      • AddRelationship

        public boolean AddRelationship​(Relationship relationship)
      • DeleteRelationship

        public boolean DeleteRelationship​(java.lang.String name)
      • UpdateRelationship

        public boolean UpdateRelationship​(Relationship relationship)
      • ReadRaster_Direct

        public int ReadRaster_Direct​(int xoff,
                                     int yoff,
                                     int xsize,
                                     int ysize,
                                     int buf_xsize,
                                     int buf_ysize,
                                     int buf_type,
                                     java.nio.ByteBuffer nioBuffer,
                                     int[] band_list,
                                     int nPixelSpace,
                                     int nLineSpace,
                                     int nBandSpace)
        Read a region of image data from multiple bands.

        This method allows reading a region of one or more Band's from this dataset into a buffer. It automatically takes care of data type translation if the data type (buf_type) of the buffer is different than that of the Band. The method also takes care of image decimation / replication if the buffer size (buf_xsize x buf_ysize) is different than the size of the region being accessed (xsize x ysize).

        The nPixelSpace, nLineSpace and nBandSpace parameters allow reading into or writing from various organization of buffers.

        For highest performance full resolution data access, read on "block boundaries" as returned by Band.GetBlockSize(int[], int[]), or use the Band.ReadBlock(int, int, java.nio.ByteBuffer) method.

        When requesting a multi-byte datatype (GDT_Int16, GDT_Int32, GDT_Float32, ...), you should generally set the byte order of the buffer to the native order of the machine with nioBuffer.order(ByteOrder.nativeOrder()) (the default is BIG_ENDIAN) if you use the getShort(), getInt(), getFloat(), ... methods of the ByteBuffer class.

        Parameters:
        xoff - The pixel offset to the top left corner of the region of the band to be accessed. This would be zero to start from the left side.
        yoff - The line offset to the top left corner of the region of the band to be accessed. This would be zero to start from the top.
        xsize - The width of the region of the band to be accessed in pixels.
        ysize - The height of the region of the band to be accessed in lines.
        buf_xsize - the width of the buffer image into which the desired region is to be read.
        buf_ysize - the height of the buffer image into which the desired region is to be read.
        buf_type - the type of the pixel values in the nioBuffer data buffer. One of gdalconstConstants.GDT_Byte, gdalconstConstants.GDT_Int16, ... The pixel values will automatically be translated to/from the Band data type as needed.
        nioBuffer - The buffer into which the data will be written. This buffer must contain at least buf_xsize * buf_ysize * nBandCount words of type buf_type. It is organized in left to right,top to bottom pixel order. Spacing is controlled by the nPixelSpace, and nLineSpace parameters.
        band_list - the list of band numbers being read/written. Note band numbers are 1 based. This may be null to select the first nBandCount bands.
        nPixelSpace - The byte offset from the start of one pixel value in the buffer to the start of the next pixel value within a scanline. If defaulted (0) the size of the datatype buf_type is used.
        nLineSpace - The byte offset from the start of one scanline in the buffer to the start of the next. If defaulted the size of the datatype buf_type * buf_xsize is used.
        nBandSpace - the byte offset from the start of one bands data to the start of the next. If defaulted (zero) the value will be nLineSpace * buf_ysize implying band sequential organization of the data buffer.
        Returns:
        gdalconst.CE_Failure if the access fails, otherwise gdalconst.CE_None.
        Since:
        Java bindings 1.7.0
      • ReadRaster

        public int ReadRaster​(int xoff,
                              int yoff,
                              int xsize,
                              int ysize,
                              int buf_xsize,
                              int buf_ysize,
                              int buf_type,
                              byte[] array,
                              int[] band_list,
                              int nPixelSpace,
                              int nLineSpace,
                              int nBandSpace)
        Read a region of image data from multiple bands.

        This method allows reading a region of one or more Band's from this dataset into a buffer. It automatically takes care of data type translation if the data type (buf_type) of the buffer is different than that of the Band. The method also takes care of image decimation / replication if the buffer size (buf_xsize x buf_ysize) is different than the size of the region being accessed (xsize x ysize).

        The nPixelSpace, nLineSpace and nBandSpace parameters allow reading into or writing from various organization of buffers.

        For highest performance full resolution data access, read on "block boundaries" as returned by Band.GetBlockSize(int[], int[]), or use the Band.ReadBlock(int, int, java.nio.ByteBuffer) method.

        Parameters:
        xoff - The pixel offset to the top left corner of the region of the band to be accessed. This would be zero to start from the left side.
        yoff - The line offset to the top left corner of the region of the band to be accessed. This would be zero to start from the top.
        xsize - The width of the region of the band to be accessed in pixels.
        ysize - The height of the region of the band to be accessed in lines.
        buf_xsize - the width of the buffer image into which the desired region is to be read.
        buf_ysize - the height of the buffer image into which the desired region is to be read.
        buf_type - the type of the pixel values in the array. One of gdalconstConstants.GDT_Byte, gdalconstConstants.GDT_Int16, ... The pixel values will automatically be translated to/from the Band data type as needed. The GDAL type must be consistent with the type of the Java array.
        array - The array into which the data will be written. This buffer must contain at least buf_xsize * buf_ysize elements * nBandCount . It is organized in left to right,top to bottom pixel order. Spacing is controlled by the nPixelSpace, and nLineSpace parameters.
        band_list - the list of band numbers being read/written. Note band numbers are 1 based. This may be null to select the first nBandCount bands.
        nPixelSpace - The byte offset from the start of one pixel value in the buffer to the start of the next pixel value within a scanline. If defaulted (0) the size of the datatype buf_type is used.
        nLineSpace - The byte offset from the start of one scanline in the buffer to the start of the next. If defaulted the size of the datatype buf_type * buf_xsize is used.
        nBandSpace - the byte offset from the start of one bands data to the start of the next. If defaulted (zero) the value will be nLineSpace * buf_ysize implying band sequential organization of the data buffer.
        Returns:
        gdalconst.CE_Failure if the access fails, otherwise gdalconst.CE_None.
        Since:
        Java bindings 1.7.0
      • WriteRaster_Direct

        public int WriteRaster_Direct​(int xoff,
                                      int yoff,
                                      int xsize,
                                      int ysize,
                                      int buf_xsize,
                                      int buf_ysize,
                                      int buf_type,
                                      java.nio.ByteBuffer nioBuffer,
                                      int[] band_list,
                                      int nPixelSpace,
                                      int nLineSpace,
                                      int nBandSpace)
        Write a region of image data from multiple bands.

        This method allows writing data from a buffer into a region of the Band's. It automatically takes care of data type translation if the data type (buf_type) of the buffer is different than that of the Band. The method also takes care of image decimation / replication if the buffer size (buf_xsize x buf_ysize) is different than the size of the region being accessed (xsize x ysize).

        The nPixelSpace, nLineSpace and nBandSpace parameters allow reading into or writing from various organization of buffers.

        For highest performance full resolution data access, write on "block boundaries" as returned by Band.GetBlockSize(int[], int[]), or use the Band.WriteBlock(int, int, java.nio.ByteBuffer) method.

        Before writing into a multi-byte datatype buffer (GDT_Int16, GDT_Int32, GDT_Float32, ...), you should generally set the byte order of the buffer to the native order of the machine with nioBuffer.order(ByteOrder.nativeOrder()) (the default is BIG_ENDIAN) if you use the putShort(), putInt(), putFloat(), ... methods of the ByteBuffer class.

        Parameters:
        xoff - The pixel offset to the top left corner of the region of the band to be accessed. This would be zero to start from the left side.
        yoff - The line offset to the top left corner of the region of the band to be accessed. This would be zero to start from the top.
        xsize - The width of the region of the band to be accessed in pixels.
        ysize - The height of the region of the band to be accessed in lines.
        buf_xsize - the width of the buffer image from which the desired region is to be written.
        buf_ysize - the height of the buffer image from which the desired region is to be written.
        buf_type - the type of the pixel values in the nioBuffer data buffer. One of gdalconstConstants.GDT_Byte, gdalconstConstants.GDT_Int16, ... The pixel values will automatically be translated to/from the Band data type as needed.
        nioBuffer - The buffer into which the data should be read, or from which it should be written. This buffer must contain at least buf_xsize * buf_ysize * nBandCount words of type buf_type. It is organized in left to right,top to bottom pixel order. Spacing is controlled by the nPixelSpace, and nLineSpace parameters.
        band_list - the list of band numbers being read/written. Note band numbers are 1 based. This may be null to select the first nBandCount bands.
        nPixelSpace - The byte offset from the start of one pixel value in the buffer to the start of the next pixel value within a scanline. If defaulted (0) the size of the datatype buf_type is used.
        nLineSpace - The byte offset from the start of one scanline in the buffer to the start of the next. If defaulted the size of the datatype buf_type * buf_xsize is used.
        nBandSpace - the byte offset from the start of one bands data to the start of the next. If defaulted (zero) the value will be nLineSpace * buf_ysize implying band sequential organization of the data buffer.
        Returns:
        gdalconst.CE_Failure if the access fails, otherwise gdalconst.CE_None.
        Since:
        Java bindings 1.7.0
      • WriteRaster

        public int WriteRaster​(int xoff,
                               int yoff,
                               int xsize,
                               int ysize,
                               int buf_xsize,
                               int buf_ysize,
                               int buf_type,
                               byte[] array,
                               int[] band_list,
                               int nPixelSpace,
                               int nLineSpace,
                               int nBandSpace)
        Write a region of image data from multiple bands.

        This method allows writing data from a buffer into a region of the Band's. It automatically takes care of data type translation if the data type (buf_type) of the buffer is different than that of the Band. The method also takes care of image decimation / replication if the buffer size (buf_xsize x buf_ysize) is different than the size of the region being accessed (xsize x ysize).

        The nPixelSpace, nLineSpace and nBandSpace parameters allow reading into or writing from various organization of buffers.

        For highest performance full resolution data access, write on "block boundaries" as returned by Band.GetBlockSize(int[], int[]), or use the Band.WriteBlock(int, int, java.nio.ByteBuffer) method.

        Parameters:
        xoff - The pixel offset to the top left corner of the region of the band to be accessed. This would be zero to start from the left side.
        yoff - The line offset to the top left corner of the region of the band to be accessed. This would be zero to start from the top.
        xsize - The width of the region of the band to be accessed in pixels.
        ysize - The height of the region of the band to be accessed in lines.
        buf_xsize - the width of the buffer image from which the desired region is to be written.
        buf_ysize - the height of the buffer image from which the desired region is to be written.
        buf_type - the type of the pixel values in the array. One of gdalconstConstants.GDT_Byte, gdalconstConstants.GDT_Int16, ... The pixel values will automatically be translated to/from the Band data type as needed. The GDAL type must be consistent with the type of the Java array.
        array - The array from which the data will be read. This buffer must contain at least buf_xsize * buf_ysize elements * nBandCount . It is organized in left to right,top to bottom pixel order. Spacing is controlled by the nPixelSpace, and nLineSpace parameters.
        band_list - the list of band numbers being read/written. Note band numbers are 1 based. This may be null to select the first nBandCount bands.
        nPixelSpace - The byte offset from the start of one pixel value in the buffer to the start of the next pixel value within a scanline. If defaulted (0) the size of the datatype buf_type is used.
        nLineSpace - The byte offset from the start of one scanline in the buffer to the start of the next. If defaulted the size of the datatype buf_type * buf_xsize is used.
        nBandSpace - the byte offset from the start of one bands data to the start of the next. If defaulted (zero) the value will be nLineSpace * buf_ysize implying band sequential organization of the data buffer.
        Returns:
        gdalconst.CE_Failure if the access fails, otherwise gdalconst.CE_None.
        Since:
        Java bindings 1.7.0