@loaders.gl/geopackage 4.0.0-alpha.4 → 4.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.d.ts +2 -0
- package/dist/bundle.d.ts.map +1 -0
- package/dist/geopackage-loader.d.ts +13 -0
- package/dist/geopackage-loader.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/lib/parse-geopackage.d.ts +3 -0
- package/dist/lib/parse-geopackage.d.ts.map +1 -0
- package/dist/lib/types.d.ts +188 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/package.json +6 -6
package/dist/bundle.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../src/bundle.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,aAAa,KAAqB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { LoaderWithParser, LoaderOptions } from '@loaders.gl/loader-utils';
|
|
2
|
+
export declare type GeoPackageLoaderOptions = LoaderOptions & {
|
|
3
|
+
geopackage?: {
|
|
4
|
+
sqlJsCDN: string | null;
|
|
5
|
+
};
|
|
6
|
+
gis?: {
|
|
7
|
+
reproject?: boolean;
|
|
8
|
+
_targetCrs?: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
/** Geopackage loader */
|
|
12
|
+
export declare const GeoPackageLoader: LoaderWithParser;
|
|
13
|
+
//# sourceMappingURL=geopackage-loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geopackage-loader.d.ts","sourceRoot":"","sources":["../src/geopackage-loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,gBAAgB,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAQ9E,oBAAY,uBAAuB,GAAG,aAAa,GAAG;IACpD,UAAU,CAAC,EAAE;QAEX,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;KACzB,CAAC;IACF,GAAG,CAAC,EAAE;QACJ,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;CACH,CAAC;AAEF,wBAAwB;AACxB,eAAO,MAAM,gBAAgB,EAAE,gBAc9B,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-geopackage.d.ts","sourceRoot":"","sources":["../../src/lib/parse-geopackage.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,uBAAuB,EAAC,MAAM,sBAAsB,CAAC;AA8DlE,wBAA8B,eAAe,CAC3C,WAAW,EAAE,WAAW,EACxB,OAAO,CAAC,EAAE,uBAAuB,eAoBlC"}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
export interface GeometryBitFlags {
|
|
2
|
+
littleEndian: boolean;
|
|
3
|
+
envelopeLength: number;
|
|
4
|
+
emptyGeometry: boolean;
|
|
5
|
+
extendedGeometryType: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare type ProjectionMapping = {
|
|
8
|
+
[srsId: number]: string;
|
|
9
|
+
};
|
|
10
|
+
export declare type DataColumnsMapping = {
|
|
11
|
+
[columnName: string]: string | null;
|
|
12
|
+
};
|
|
13
|
+
export declare type SQLiteTypes = 'BOOLEAN' | 'TINYINT' | 'SMALLINT' | 'MEDIUMINT' | 'INT' | 'INTEGER' | 'FLOAT' | 'DOUBLE' | 'REAL' | 'TEXT' | 'BLOB' | 'DATE' | 'DATETIME' | 'GEOMETRY';
|
|
14
|
+
/**
|
|
15
|
+
* https://www.geopackage.org/spec121/#spatial_ref_sys
|
|
16
|
+
*/
|
|
17
|
+
export interface SpatialRefSysRow {
|
|
18
|
+
/**
|
|
19
|
+
* Human readable name of this SRS
|
|
20
|
+
*/
|
|
21
|
+
srs_name: string;
|
|
22
|
+
/**
|
|
23
|
+
* Unique identifier for each Spatial Reference System within a GeoPackage
|
|
24
|
+
*/
|
|
25
|
+
srs_id: number;
|
|
26
|
+
/**
|
|
27
|
+
* Case-insensitive name of the defining organization e.g. EPSG or epsg
|
|
28
|
+
*/
|
|
29
|
+
organization: string;
|
|
30
|
+
/**
|
|
31
|
+
* Numeric ID of the Spatial Reference System assigned by the organization
|
|
32
|
+
*/
|
|
33
|
+
organization_coordsys_id: number;
|
|
34
|
+
/**
|
|
35
|
+
* Well-known Text [A32] Representation of the Spatial Reference System
|
|
36
|
+
*/
|
|
37
|
+
definition: string;
|
|
38
|
+
/**
|
|
39
|
+
* Human readable description of this SRS
|
|
40
|
+
*/
|
|
41
|
+
description?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* https://www.geopackage.org/spec121/#_contents
|
|
45
|
+
*/
|
|
46
|
+
export interface ContentsRow {
|
|
47
|
+
/**
|
|
48
|
+
* The name of the actual content (e.g., tiles, features, or attributes) table
|
|
49
|
+
*/
|
|
50
|
+
table_name: string;
|
|
51
|
+
/**
|
|
52
|
+
* Type of data stored in the table
|
|
53
|
+
*/
|
|
54
|
+
data_type: 'features' | 'attributes' | 'tiles';
|
|
55
|
+
/**
|
|
56
|
+
* A human-readable identifier (e.g. short name) for the table_name content
|
|
57
|
+
*/
|
|
58
|
+
identifier?: string;
|
|
59
|
+
/**
|
|
60
|
+
* A human-readable description for the table_name content
|
|
61
|
+
*/
|
|
62
|
+
description?: string;
|
|
63
|
+
/**
|
|
64
|
+
* timestamp of last change to content, in ISO 8601 format
|
|
65
|
+
*/
|
|
66
|
+
last_change: string;
|
|
67
|
+
/**
|
|
68
|
+
* Bounding box minimum easting or longitude for all content in table_name. If tiles, this is informational and the tile matrix set should be used for calculating tile coordinates.
|
|
69
|
+
*/
|
|
70
|
+
min_x?: number;
|
|
71
|
+
/**
|
|
72
|
+
* Bounding box minimum northing or latitude for all content in table_name. If tiles, this is informational and the tile matrix set should be used for calculating tile coordinates.
|
|
73
|
+
*/
|
|
74
|
+
min_y?: number;
|
|
75
|
+
/**
|
|
76
|
+
* Bounding box maximum easting or longitude for all content in table_name. If tiles, this is informational and the tile matrix set should be used for calculating tile coordinates.
|
|
77
|
+
*/
|
|
78
|
+
max_x?: number;
|
|
79
|
+
/**
|
|
80
|
+
* Bounding box maximum northing or latitude for all content in table_name. If tiles, this is informational and the tile matrix set should be used for calculating tile coordinates.
|
|
81
|
+
*/
|
|
82
|
+
max_y?: number;
|
|
83
|
+
/**
|
|
84
|
+
* Spatial Reference System ID: gpkg_spatial_ref_sys.srs_id; when data_type is features, SHALL also match gpkg_geometry_columns.srs_id; When data_type is tiles, SHALL also match gpkg_tile_matrix_set.srs_id
|
|
85
|
+
*/
|
|
86
|
+
srs_id?: number;
|
|
87
|
+
}
|
|
88
|
+
declare type GeometryType = 'GEOMETRY' | 'POINT' | 'LINESTRING' | 'POLYGON' | 'MULTIPOINT' | 'MULTILINESTRING' | 'MULTIPOLYGON' | 'GEOMETRYCOLLECTION' | 'CIRCULARSTRING' | 'COMPOUNDCURVE' | 'CURVEPOLYGON' | 'MULTICURVE' | 'MULTISURFACE' | 'CURVE' | 'SURFACE';
|
|
89
|
+
/**
|
|
90
|
+
* https://www.geopackage.org/spec121/#_geometry_columns
|
|
91
|
+
*/
|
|
92
|
+
export interface GeometryColumnsRow {
|
|
93
|
+
/**
|
|
94
|
+
* Name of the table containing the geometry column
|
|
95
|
+
*/
|
|
96
|
+
table_name: string;
|
|
97
|
+
/**
|
|
98
|
+
* Name of a column in the feature table that is a Geometry Column
|
|
99
|
+
*/
|
|
100
|
+
column_name: string;
|
|
101
|
+
/**
|
|
102
|
+
* Name from Geometry Type Codes (Core) or Geometry Type Codes (Extension) in Geometry Types (Normative)
|
|
103
|
+
*/
|
|
104
|
+
geometry_type_name: GeometryType;
|
|
105
|
+
/**
|
|
106
|
+
* Spatial Reference System ID: gpkg_spatial_ref_sys.srs_id
|
|
107
|
+
*/
|
|
108
|
+
srs_id: number;
|
|
109
|
+
/**
|
|
110
|
+
* 0: z values prohibited; 1: z values mandatory; 2: z values optional
|
|
111
|
+
*/
|
|
112
|
+
z: 0 | 1 | 2;
|
|
113
|
+
/**
|
|
114
|
+
* 0: m values prohibited; 1: m values mandatory; 2: m values optional
|
|
115
|
+
*/
|
|
116
|
+
m: 0 | 1 | 2;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* https://www.geopackage.org/spec121/#extensions_table_definition
|
|
120
|
+
*/
|
|
121
|
+
export interface ExtensionsRow {
|
|
122
|
+
/**
|
|
123
|
+
* Name of the table that requires the extension. When NULL, the extension is required for the entire GeoPackage. SHALL NOT be NULL when the column_name is not NULL.
|
|
124
|
+
*/
|
|
125
|
+
table_name?: string;
|
|
126
|
+
/**
|
|
127
|
+
* Name of the column that requires the extension. When NULL, the extension is required for the entire table.
|
|
128
|
+
*/
|
|
129
|
+
column_name?: string;
|
|
130
|
+
/**
|
|
131
|
+
* The case sensitive name of the extension that is required, in the form <author>_<extension_name>.
|
|
132
|
+
*/
|
|
133
|
+
extension_name: string;
|
|
134
|
+
/**
|
|
135
|
+
* Permalink, URI, or reference to a document that defines the extension
|
|
136
|
+
*/
|
|
137
|
+
definition: string;
|
|
138
|
+
/**
|
|
139
|
+
* Indicates scope of extension effects on readers / writers: 'read-write' or 'write-only' in lowercase.
|
|
140
|
+
*/
|
|
141
|
+
scope: string;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* https://www.geopackage.org/spec121/#gpkg_data_columns_cols
|
|
145
|
+
*/
|
|
146
|
+
export interface DataColumnsRow {
|
|
147
|
+
/**
|
|
148
|
+
* Name of the tiles or feature table
|
|
149
|
+
*/
|
|
150
|
+
table_name: string;
|
|
151
|
+
/**
|
|
152
|
+
* Name of the table column
|
|
153
|
+
*/
|
|
154
|
+
column_name: string;
|
|
155
|
+
/**
|
|
156
|
+
* A human-readable identifier (e.g. short name) for the column_name content
|
|
157
|
+
*/
|
|
158
|
+
name?: string;
|
|
159
|
+
/**
|
|
160
|
+
* A human-readable formal title for the column_name content
|
|
161
|
+
*/
|
|
162
|
+
title?: string;
|
|
163
|
+
/**
|
|
164
|
+
* A human-readable description for the column_name content
|
|
165
|
+
*/
|
|
166
|
+
description?: string;
|
|
167
|
+
/**
|
|
168
|
+
* MIME [A21] type of column_name if BLOB type, or NULL for other types
|
|
169
|
+
*/
|
|
170
|
+
mime_type?: string;
|
|
171
|
+
/**
|
|
172
|
+
* Column value constraint name (lowercase) specified by reference to gpkg_data_column_constraints.constraint name
|
|
173
|
+
*/
|
|
174
|
+
constraint_name?: string;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Type for PRAGMA table_info(tableName);
|
|
178
|
+
*/
|
|
179
|
+
export interface PragmaTableInfoRow {
|
|
180
|
+
cid: number;
|
|
181
|
+
name: string;
|
|
182
|
+
type: SQLiteTypes;
|
|
183
|
+
notnull: 0 | 1;
|
|
184
|
+
dflt_value: any;
|
|
185
|
+
pk: 0 | 1;
|
|
186
|
+
}
|
|
187
|
+
export {};
|
|
188
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lib/types.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;IACvB,oBAAoB,EAAE,OAAO,CAAC;CAC/B;AAED,oBAAY,iBAAiB,GAAG;IAAC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAC,CAAC;AAC1D,oBAAY,kBAAkB,GAAG;IAAC,CAAC,UAAU,EAAE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B,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC;CACX"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/geopackage",
|
|
3
3
|
"description": "GeoPackage data loaders",
|
|
4
|
-
"version": "4.0.0-alpha.
|
|
4
|
+
"version": "4.0.0-alpha.5",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"sql",
|
|
15
15
|
"GeoPackage"
|
|
16
16
|
],
|
|
17
|
-
"types": "
|
|
17
|
+
"types": "dist/index.d.ts",
|
|
18
18
|
"main": "dist/index.js",
|
|
19
19
|
"module": "dist/index.js",
|
|
20
20
|
"sideEffects": false,
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@babel/runtime": "^7.3.1",
|
|
28
|
-
"@loaders.gl/gis": "4.0.0-alpha.
|
|
29
|
-
"@loaders.gl/schema": "4.0.0-alpha.
|
|
30
|
-
"@loaders.gl/wkt": "4.0.0-alpha.
|
|
28
|
+
"@loaders.gl/gis": "4.0.0-alpha.5",
|
|
29
|
+
"@loaders.gl/schema": "4.0.0-alpha.5",
|
|
30
|
+
"@loaders.gl/wkt": "4.0.0-alpha.5",
|
|
31
31
|
"@math.gl/proj4": "^3.5.1",
|
|
32
32
|
"@types/sql.js": "^1.4.2",
|
|
33
33
|
"sql.js": "^1.5.0"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "7a71a54bdf1ddf985cc3af3db90b82e7fa97d025"
|
|
36
36
|
}
|