GeoPackage Feature Representation

In addition to the generic FME feature attributes that FME Workbench adds to all features (see Feature Attributes and Supported Geometries), this format adds a format-specific attribute described in this section, and the format-specific attributes described in the Text File Reader documentation.

Features read from a database consist of geometry and a series of attribute values. The feature type of each GeoPackage feature is as defined in its Feature Type parameters. Features written to the database have the destination table as their feature type, and attributes as defined in Feature Type attributes.

The GeoPackage attribute type mapping is as follows:

GeoPackage Attribute Type FME Attribute Type
text fme_buffer
text(width) fme_varchar(width)
text(width) fme_char(width)
blob fme_buffer
blob(width) fme_varchar(width)
tinyint fme_char
text(1) fme_char
date fme_date
datetime fme_datetime
datetime fme_time
float fme_real32
double fme_real64
double fme_decimal(width, decimal)
boolean fme_boolean
smallint fme_int16
smallint fme_uint8
mediumint fme_int32
mediumint fme_uint16
int fme_int64
int fme_uint32
text(20) fme_uint64

Geometry

The geometry of GeoPackage features may be identified by the geopackage_type attribute.

If incoming features are not compatible with the geometry specified in the feature type parameters, geopackage_type will be written as geopackage_none.

The valid values for this attribute are:

geopackage_type Description

geopackage_none

FME Feature with no geometry.

A table created with this type will be an Attributes table.

geopackage_circularstring

Arc by 3 points feature.

Parent type: geopackage_curve

geopackage_compoundcurve

Path feature made up of one or more curve segments.

Parent type: geopackage_curve

geopackage_curve

Feature with curve geometry. This is an abstract geometry type, and the reader will not create features of this type.

A table can be created with this type, but features written to the table must be one of the following subtypes:

  • geopackage_linestring
  • geopackage_circularstring
  • geopackage_compoundcurve

Parent type: geopackage_geometry

geopackage_curvepolygon

Polygon or donut feature with boundaries that may include arcs.

Features written to a table of this type can also be the following subtype:

  • geopackage_polygon

Parent type: geopackage_surface

geopackage_geometry

All geometries allowed. All types are subtypes of this type.

geopackage_geometrycollection

Feature with multiple geometries.

Features written to a table of this type can also be one of the following subtypes:

  • geopackage_multipoint
  • geopackage_multicurve
  • geopackage_multilinestring
  • geopackage_multisurface
  • geopackage_multipolygon

Parent type: geopackage_geometry

geopackage_linestring

Linear feature.

Parent type: geopackage_curve

geopackage_multicurve

Feature with multiple curve geometries.

Features written to a table of this type can also be the following subtype:

  • geopackage_multilinestring

Parent type: geopackage_geometrycollection

geopackage_multilinestring

Feature with multiple line geometries.

Parent type: geopackage_multicurve

geopackage_multipoint

Feature with multiple point geometries.

Parent type: geopackage_geometrycollection

geopackage_multipolygon

Feature with multiple polygon geometries. Parent type: geopackage_multisurface

geopackage_multisurface

Feature with multiple surface geometries.

Features written to a table of this type can also be the following subtype:

  • geopackage_multipolygon

Parent type: geopackage_geometrycollection

geopackage_point

Point feature.

Parent type: geopackage_geometry

geopackage_polygon

Simple polygon or donut feature.

Parent type: geopackage_curvepolygon

geopackage_surface

Feature with surface geometry.

Parent type: geopackage_geometry