[gdal-dev] Validate_gpkg and TEXT with length

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Wed Mar 7 13:49:50 PST 2018


Hi,

I checked some .gpkg database that is created by FME with the validate_gpkg.py script. It gives this error:

__main__.GPKGCheckException: Req 5: table stand has column standnumberextension
of unexpected type TEXT ( 2 )

Excerpt from the standard:
TEXT{(maxchar_count)}
Variable length string encoded in either UTF-8 or UTF-16, determined by PRAGMA encoding; see http://www.sqlite.org/pragma.html#pragma_encoding The optional maxchar_count defines the maximum number of characters in the string. If not specified, the length is unbounded. The count is provided for informational purposes, and applications MAY choose to truncate longer strings if encountered. When present, it is best practice for applications to adhere to the character count. Stored as SQLite TEXT

Unfortunately there is no example in the standard about how the text field with maxchar count should be created correctly and how it should appear in the PRAGMA. I wonder if the error is caused by the spaces around number 2 in
TEXT ( 2 ).

-Jukka Rahkonen-


More information about the gdal-dev mailing list