Class GdbFeatureWriter

java.lang.Object
ch.so.agi.filegdb.write.GdbFeatureWriter
All Implemented Interfaces:
AutoCloseable

public final class GdbFeatureWriter extends Object implements AutoCloseable
Writes features into a feature class created by GdbCreator.
  • Method Details

    • name

      public String name()
    • featureCount

      public long featureCount()
    • write

      public long write(Object[] attributes, ch.so.agi.filegdb.geometry.FileGdbGeometry geometry) throws IOException
      Writes one feature.
      Parameters:
      attributes - values aligned with the attribute fields of the definition
      geometry - geometry value, may be null when the geometry field is nullable
      Returns:
      the assigned object id
      Throws:
      IOException
    • write

      public long write(Object[] attributes) throws IOException
      Writes one feature without geometry.
      Throws:
      IOException
    • updateRow

      public void updateRow(long objectId, Object[] attributes, ch.so.agi.filegdb.geometry.FileGdbGeometry geometry) throws IOException
      Replaces the values of an existing feature in place.

      The object id stays allocated and unchanged. The previous row blob is marked deleted, so readers never observe the old values.

      Parameters:
      objectId - one based object id
      attributes - values aligned with the attribute fields of the definition
      geometry - geometry value, may be null when the geometry field is nullable
      Throws:
      IOException
    • deleteRow

      public void deleteRow(long objectId) throws IOException
      Marks a feature as deleted.
      Parameters:
      objectId - one based object id; deleting an already deleted feature is a no-op
      Throws:
      IOException
    • close

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