Skip to content

Commit 3981bf0

Browse files
committed
Merge branch '4.2.x'
2 parents 23eb4ce + 47486e1 commit 3981bf0

File tree

7 files changed

+399
-136
lines changed

7 files changed

+399
-136
lines changed

Diff for: README.md

-98
Original file line numberDiff line numberDiff line change
@@ -36,104 +36,6 @@ Software source code previously released under an open source license and then m
3636

3737
The GeoPackage JavaScript library currently provides the ability to read GeoPackage files. This library works both in the browser and in Node. In the browser tiles are rendered using HTML5 Canvas and GeoPackages are read using [sql.js](https://github.com/kripken/sql.js/). In Node tiles are rendered [PureImage](https://github.com/joshmarinacci/node-pureimage) and GeoPackages are read using [node-sqlite3](https://github.com/mapbox/node-sqlite3).
3838

39-
### Changelog
40-
41-
##### 5.0.1
42-
- Added in FeatureTileGenerator
43-
- Added in UrlTileGenerator
44-
- Rebuilt CanvasKit to add support for webp and jpeg
45-
46-
##### 5.0.0
47-
- GeoPackage JS's API has been updated to more closely match GeoPackage Java v6.4.0
48-
- Not yet implemented: 2D Gridded Tile Coverage Extension and OGC API Feature Generator
49-
- GeoPackageExtensions is now ExtensionManager
50-
- GeoPackageAPI is now GeoPackageManager
51-
- Added FeatureTileTableLink extension
52-
- Added support for extended geometry types
53-
- Added Properties extension
54-
- Added ZoomOther extension
55-
- Added support for drawing extended geometry types
56-
- Updated to use NGA simple features javascript libraries
57-
- Updated to use NGA projections javascript library
58-
- Added UserCustomRow
59-
- Reworked UserRow, UserTable, and UserColumn and updated all super types
60-
- Added in FeatureConnection, TileConnection, AttributesConnection and UserCustomConnections.
61-
- Added GeoPackageCache
62-
63-
##### 4.2.3
64-
65-
- fix cached geometry error
66-
67-
##### 4.2.2
68-
69-
- fix simplify error
70-
71-
##### 4.2.1
72-
73-
- Fix for drawing geometries outside of the 3857 bounds
74-
75-
##### 4.2.0
76-
77-
- Support for drawing vector data into EPSG:4326 tiles
78-
- Added createStandardWGS84TileTable
79-
80-
##### 4.1.0
81-
82-
- Typescript updates
83-
- Extract converters, leaflet plugin, mobile optimizer, and viewer into their own packages
84-
85-
##### 4.0.0
86-
87-
- Alter tables functions (copy, rename for table and columns)
88-
- Publish separate node and browser module
89-
- GeoPackageJS can now be run in Node.js worker_threads and Web Workers
90-
91-
##### 2.1.0
92-
93-
- Implementation of the Feature Style Extension and Contents ID Extension
94-
95-
##### 2.0.8
96-
97-
- Checks for Electron when returning a tile creator
98-
99-
##### 2.0
100-
101-
- All new API utilizing Promises
102-
103-
##### 1.1.4
104-
105-
- Adds a method to retrieve tiles in EPSG:4326
106-
107-
##### 1.1.3
108-
109-
- Fixes issue #115
110-
111-
##### 1.1.2
112-
113-
- fix case where GeoPackage Zoom does not correspond to the web map zoom
114-
115-
##### 1.1.1
116-
117-
- fix more instances of proj4 bug for react
118-
- fixed tile generation for images with different x and y pixel densities
119-
120-
##### 1.1.0
121-
122-
- accept pull request adding support for react
123-
- fix bug with projected tiles that spanned the date line
124-
125-
##### 1.0.25
126-
127-
- ensure we use proj4 2.4.3 instead of 2.4.4
128-
129-
##### 1.0.22
130-
131-
- Fixed bug where querying for indexed features only returned the geometry instead of the entire feature
132-
133-
##### 1.0.19
134-
135-
- Remove dependency on Lwip
136-
13739
### Usage ###
13840

13941
View the latest [docs](https://ngageoint.github.io/geopackage-js/).

Diff for: changelog.md

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
### Changelog
2+
3+
##### 5.0.1
4+
- Added in FeatureTileGenerator
5+
- Added in UrlTileGenerator
6+
- Rebuilt CanvasKit to add support for webp and jpeg
7+
8+
##### 5.0.0
9+
- GeoPackage JS's API has been updated to more closely match GeoPackage Java v6.4.0
10+
- Not yet implemented: 2D Gridded Tile Coverage Extension and OGC API Feature Generator
11+
- GeoPackageExtensions is now ExtensionManager
12+
- GeoPackageAPI is now GeoPackageManager
13+
- Added FeatureTileTableLink extension
14+
- Added support for extended geometry types
15+
- Added Properties extension
16+
- Added ZoomOther extension
17+
- Added support for drawing extended geometry types
18+
- Updated to use NGA simple features javascript libraries
19+
- Updated to use NGA projections javascript library
20+
- Added UserCustomRow
21+
- Reworked UserRow, UserTable, and UserColumn and updated all super types
22+
- Added in FeatureConnection, TileConnection, AttributesConnection and UserCustomConnections.
23+
- Added GeoPackageCache
24+
25+
##### 4.2.5
26+
27+
- Fix a bug that set `undefined` on sql.js prepared statement values causing sql.js to throw an error.
28+
- Update `better-sqlite3` dependency to 9.x.
29+
- Make `properties` parameter to optional in signature of `createMediaTable()` method.
30+
- Add stack trace to error log when loading SQLite adapter.
31+
32+
##### 4.2.4
33+
34+
- Update CanvasKit libs with libs from develop to fix runtime error in Node 18
35+
36+
##### 4.2.3
37+
38+
- fix cached geometry error
39+
40+
##### 4.2.2
41+
42+
- fix simplify error
43+
44+
##### 4.2.1
45+
46+
- Fix for drawing geometries outside of the 3857 bounds
47+
48+
##### 4.2.0
49+
50+
- Support for drawing vector data into EPSG:4326 tiles
51+
- Added createStandardWGS84TileTable
52+
53+
##### 4.1.0
54+
55+
- Typescript updates
56+
- Extract converters, leaflet plugin, mobile optimizer, and viewer into their own packages
57+
58+
##### 4.0.0
59+
60+
- Alter tables functions (copy, rename for table and columns)
61+
- Publish separate node and browser module
62+
- GeoPackageJS can now be run in Node.js worker_threads and Web Workers
63+
64+
##### 2.1.0
65+
66+
- Implementation of the Feature Style Extension and Contents ID Extension
67+
68+
##### 2.0.8
69+
70+
- Checks for Electron when returning a tile creator
71+
72+
##### 2.0
73+
74+
- All new API utilizing Promises
75+
76+
##### 1.1.4
77+
78+
- Adds a method to retrieve tiles in EPSG:4326
79+
80+
##### 1.1.3
81+
82+
- Fixes issue #115
83+
84+
##### 1.1.2
85+
86+
- fix case where GeoPackage Zoom does not correspond to the web map zoom
87+
88+
##### 1.1.1
89+
90+
- fix more instances of proj4 bug for react
91+
- fixed tile generation for images with different x and y pixel densities
92+
93+
##### 1.1.0
94+
95+
- accept pull request adding support for react
96+
- fix bug with projected tiles that spanned the date line
97+
98+
##### 1.0.25
99+
100+
- ensure we use proj4 2.4.3 instead of 2.4.4
101+
102+
##### 1.0.22
103+
104+
- Fixed bug where querying for indexed features only returned the geometry instead of the entire feature
105+
106+
##### 1.0.19
107+
108+
- Remove dependency on Lwip

Diff for: lib/context/context.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ export class Context {
2929
require('better-sqlite3');
3030
Db.registerDbAdapter(SqliteAdapter);
3131
} catch (e) {
32-
console.error(
33-
'Unable to register SqliteAdapter. The better-sqlite3 module was not found. Falling back to SqljsAdapter.',
34-
);
32+
console.error('Unable to register SqliteAdapter. The better-sqlite3 module was not found. Falling back to SqljsAdapter.', e);
3533
// fallback to sqljs adapter
3634
Db.registerDbAdapter(SqljsAdapter);
3735
}

Diff for: lib/db/dbValue.ts

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
/**
22
* DBValue can be a boolean, string, number, Buffer or Uint8Array
3+
*
4+
* TODO:
5+
* This should allow `null` as well, but adding that could be a breaking change to clients.
6+
* Additionally set `"strictNullChecks": true` in tsconfig.
37
*/
48
export type DBValue = boolean | string | number | Buffer | Uint8Array;

Diff for: lib/db/sqljsAdapter.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ export class SqljsAdapter implements DBAdapter {
295295
bindAndInsert(statement: any, params?: [] | Record<string, DBValue>): number {
296296
if (params && !(params instanceof Array)) {
297297
for (const key in params) {
298-
params['$' + key] = params[key];
298+
params['$' + key] = typeof params[key] === 'undefined' ? null : params[key];
299299
}
300300
}
301301
return statement.run(params).lastInsertRowid;

0 commit comments

Comments
 (0)