Skip to content

Latest commit

 

History

History
56 lines (43 loc) · 2.41 KB

2f_attributes.adoc

File metadata and controls

56 lines (43 loc) · 2.41 KB

Attributes

Introduction

Non-spatial attribute data are sets (or tuples or rows) of observations that may not have an explicit geometry property. In GeoPackage, this data is stored in user-defined attribute tables. These tables may contain properties such as an ID or geo-locatable address that allow them to be relationally linkable to rows in other attribute, feature or tile tables.

Examples of attribute data include:

  • meteorological readings from a weather station

  • flow readings from a stream gauge

  • traffic volumes from embedded highway sensors

  • lists of customers

  • delivery stops

  • work orders

Contents

Data
Contents Table - Attributes Row
Requirement 118

The gpkg_contents table SHALL contain a row with a data_type column value of "attributes" for each attributes data table or view.

Attributes User Data Tables

Data
Table Definition

Non-spatial attribute data is stored in user-defined Attribute tables. Attribute sets are rows in an Attribute table. The attributes are columns in a Attribute table. (A GeoPackage is not required to contain any Attribute data tables. Attribute data tables in a GeoPackage may be empty.)

Requirement 119

A GeoPackage MAY contain tables or updatable views containing attribute sets. Every such Attribute table or view in a GeoPackage SHALL have a column with column type INTEGER and PRIMARY KEY AUTOINCREMENT column constraints per GeoPackage Attributes Example Table or View Definition and [example_attributes_table_sql].

The integer primary key of an Attribute table allows attribute sets to be linked to row level metadata records in the gpkg_metadata table by rowid [B5] values in the gpkg_metadata_reference table as described in clause [extension_metadata] below.

Table 1. GeoPackage Attributes Example Table or View Definition
Column Name Col Type Column Description Null Key

id

INTEGER

Autoincrement primary key

no

PK

text_attribute

TEXT

Text attribute of feature

yes

real_attribute

REAL

Real attribute of feature

yes

boolean_attribute

BOOLEAN

Boolean attribute of feature

yes

raster_or_photo

BLOB

Photo of the area

yes