Class FileGdbTableFile

java.lang.Object
ch.so.agi.filegdb.table.FileGdbTableFile
All Implemented Interfaces:
AutoCloseable

public final class FileGdbTableFile extends Object implements AutoCloseable
Read access to a .gdbtable file and its .gdbtablx row index.

Ported from GDAL OpenFileGDB (filegdbtable.cpp). The class exposes the physical table; feature classes and tables are layered on top by the catalog reader.

Rows are decoded sequentially in field order. Random access to a single field of a row is not offered because the row format has no random access.

  • Method Details

    • writeLayout

      public FileGdbTableFile.WriteLayout writeLayout()
    • open

      public static FileGdbTableFile open(Path path) throws IOException
      Throws:
      IOException
    • open

      public static FileGdbTableFile open(Path path, Map<String,FieldMetadata> metadata) throws IOException
      Opens a table with catalog metadata for fields. The metadata supplies the assigned domain and the high precision flag, which are not part of the binary table header.
      Throws:
      IOException
    • path

      public Path path()
    • version

      public int version()
    • validRecordCount

      public long validRecordCount()
    • totalRecordCount

      public long totalRecordCount()
    • headerBufferMaxSize

      public long headerBufferMaxSize()
    • fieldDescriptorLength

      public int fieldDescriptorLength()
    • stringsUtf8

      public boolean stringsUtf8()
    • geometryKind

      public ch.so.agi.filegdb.geometry.GeometryKind geometryKind()
    • hasZ

      public boolean hasZ()
    • hasM

      public boolean hasM()
    • fields

      public List<FileGdbField> fields()
    • geomField

      public FileGdbGeomField geomField()
      Returns the geometry field or null for plain tables.
    • geomFieldIndex

      public int geomFieldIndex()
    • objectIdFieldIndex

      public int objectIdFieldIndex()
    • reliableObjectIds

      public boolean reliableObjectIds()
    • readRow

      public Object[] readRow(long rowIndex) throws IOException
      Reads a row and decodes all field values.

      Values use the following Java types: Long for the object id and integer fields, Double for real fields, String for string and XML fields, LocalDateTime/LocalDate/LocalTime/ OffsetDateTime for date and time fields, UUID for GUID fields, byte[] for binary fields and FileGdbGeometry for geometry fields.

      Returns:
      the decoded values or null if the row is deleted or empty
      Throws:
      IOException
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Throws:
      IOException