OGC GeoPackage User Attributes

Readers: For information on the parameters in this dialog that are common to all readers, see:

Writers: For information on the parameters in this dialog that are common to all writers, see:

The GeoPackage user attribute types are as follows:

Name

The name of the field to be written.

GeoPackage attributes cannot have names that contain non ASCII characters; however, the attribute values support full UTF-8.

Type

blob

Blob fields store an array of bytes of unlimited length.

blob(<width>)

Blob fields store an array of bytes. The width parameter controls the maximum number of bytes that can be stored by the field. No padding is required for blobs shorter than this width.

Notes: Blobs encountered that have length greater than width will still be returned; they will not be truncated. The width parameter is only valuable if the features will be passed to another format that requires this information.

boolean

Boolean fields store TRUE/FALSE data, which is represented in GeoPackage as 1 for TRUE and 0 for FALSE. Data read or written from and to such fields must always have a value of either 1 or 0.

FME represents Booleans as Yes and No for TRUE and FALSE respectively, so any logging within FME will reflect this. Round-tripped values will be written as 1 or 0 as expected.

date

Date fields convert dates in GeoPackage to FME date string format.

YYYYMMDD (Year, Month, Day)

datetime

Datetime fields convert datetimes in GeoPackage to FME datetime string format.

YYYYMMDDHHmmSS

(Year, Month, Day, Hour, Minute, Second)

If a timezone is specified, then the offset from GMT is included at the end of the string in the format:

[+/-]HH:mm

(Plus or Minus, Hour, Minute)

double

Double fields store double precision floating point values.

float

Float fields store single precision floating point values.

int

Int fields store 64-bit signed integer values.

mediumint

Mediumint fields store 32-bit signed integer values.

smallint

Smallint fields store 16-bit signed integer values.

text

Text fields store UTF-8 strings of unlimited length.

text(<width>)

Text fields store UTF-8 strings. The width parameter controls the maximum number of characters that can be stored by the field. No padding is required for strings shorter than this width.

Notes:

  • Strings encountered that have length greater than width will still be returned; they will not be truncated.
  • The width parameter is only valuable if the features will be passed to another format that requires this information.

tinyint

Tinyint fields store 8-bit signed integer values.

Index

The type of index to create for the column.

If the table does not previously exist, then upon table creation, a database index of the specified type is created. The database index contains only one column.

The valid values for the column type are:

  • Indexed: An index without constraints.
  • PrimaryKey: The primary index for the table. Only one attribute may have this index type, and the attribute type must be int.
    If no attribute is specified as the primary key, then a primary key column named id will be created for new tables.
    When the Feature Operation is Insert, the PrimaryKey column is optional. If not present, then a value will be automatically generated.
    When the Feature Operation is Update or Delete, the PrimaryKey column is required and must match the primary key column in the existing table. The value of this attribute will be used to select which row to update or delete.
    Note: The value of the primary key attribute must not be null.