ngageoint / geopackage-js

GeoPackage JavaScript Library
http://ngageoint.github.io/geopackage-js/
MIT License
308 stars 78 forks source link

Column data type detection should be case insensitive #191

Open ConPac opened 1 year ago

ConPac commented 1 year ago

Hi,

Column data type detection should be case insensitive, given that SQLite follows SQL standards where identifiers are case insensitive when not quoted, which is the case for column data type definition.

Using v4.2.4, a feature table defined as create table feature (id integer not null, geometry geometry, constraint primary key(id)) is not loaded and could emit this error messages: Unsupported column data type integer Unsupported column data type geometry

This kind of errors could be avoided modifying GeoPackageDataType.fromName function (and similar GeometryType.fromName function) like this: function fromName(type) { return GeoPackageDataType[type.toUpperCase()]; }

Thanks in advance, Paco.