Skip to content

Commit

Permalink
Merge branch '4.2.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
restjohn committed Feb 27, 2024
2 parents 23eb4ce + 47486e1 commit 3981bf0
Show file tree
Hide file tree
Showing 7 changed files with 399 additions and 136 deletions.
98 changes: 0 additions & 98 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,104 +36,6 @@ Software source code previously released under an open source license and then m

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).

### Changelog

##### 5.0.1
- Added in FeatureTileGenerator
- Added in UrlTileGenerator
- Rebuilt CanvasKit to add support for webp and jpeg

##### 5.0.0
- GeoPackage JS's API has been updated to more closely match GeoPackage Java v6.4.0
- Not yet implemented: 2D Gridded Tile Coverage Extension and OGC API Feature Generator
- GeoPackageExtensions is now ExtensionManager
- GeoPackageAPI is now GeoPackageManager
- Added FeatureTileTableLink extension
- Added support for extended geometry types
- Added Properties extension
- Added ZoomOther extension
- Added support for drawing extended geometry types
- Updated to use NGA simple features javascript libraries
- Updated to use NGA projections javascript library
- Added UserCustomRow
- Reworked UserRow, UserTable, and UserColumn and updated all super types
- Added in FeatureConnection, TileConnection, AttributesConnection and UserCustomConnections.
- Added GeoPackageCache

##### 4.2.3

- fix cached geometry error

##### 4.2.2

- fix simplify error

##### 4.2.1

- Fix for drawing geometries outside of the 3857 bounds

##### 4.2.0

- Support for drawing vector data into EPSG:4326 tiles
- Added createStandardWGS84TileTable

##### 4.1.0

- Typescript updates
- Extract converters, leaflet plugin, mobile optimizer, and viewer into their own packages

##### 4.0.0

- Alter tables functions (copy, rename for table and columns)
- Publish separate node and browser module
- GeoPackageJS can now be run in Node.js worker_threads and Web Workers

##### 2.1.0

- Implementation of the Feature Style Extension and Contents ID Extension

##### 2.0.8

- Checks for Electron when returning a tile creator

##### 2.0

- All new API utilizing Promises

##### 1.1.4

- Adds a method to retrieve tiles in EPSG:4326

##### 1.1.3

- Fixes issue #115

##### 1.1.2

- fix case where GeoPackage Zoom does not correspond to the web map zoom

##### 1.1.1

- fix more instances of proj4 bug for react
- fixed tile generation for images with different x and y pixel densities

##### 1.1.0

- accept pull request adding support for react
- fix bug with projected tiles that spanned the date line

##### 1.0.25

- ensure we use proj4 2.4.3 instead of 2.4.4

##### 1.0.22

- Fixed bug where querying for indexed features only returned the geometry instead of the entire feature

##### 1.0.19

- Remove dependency on Lwip

### Usage ###

View the latest [docs](https://ngageoint.github.io/geopackage-js/).
Expand Down
108 changes: 108 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
### Changelog

##### 5.0.1
- Added in FeatureTileGenerator
- Added in UrlTileGenerator
- Rebuilt CanvasKit to add support for webp and jpeg

##### 5.0.0
- GeoPackage JS's API has been updated to more closely match GeoPackage Java v6.4.0
- Not yet implemented: 2D Gridded Tile Coverage Extension and OGC API Feature Generator
- GeoPackageExtensions is now ExtensionManager
- GeoPackageAPI is now GeoPackageManager
- Added FeatureTileTableLink extension
- Added support for extended geometry types
- Added Properties extension
- Added ZoomOther extension
- Added support for drawing extended geometry types
- Updated to use NGA simple features javascript libraries
- Updated to use NGA projections javascript library
- Added UserCustomRow
- Reworked UserRow, UserTable, and UserColumn and updated all super types
- Added in FeatureConnection, TileConnection, AttributesConnection and UserCustomConnections.
- Added GeoPackageCache

##### 4.2.5

- Fix a bug that set `undefined` on sql.js prepared statement values causing sql.js to throw an error.
- Update `better-sqlite3` dependency to 9.x.
- Make `properties` parameter to optional in signature of `createMediaTable()` method.
- Add stack trace to error log when loading SQLite adapter.

##### 4.2.4

- Update CanvasKit libs with libs from develop to fix runtime error in Node 18

##### 4.2.3

- fix cached geometry error

##### 4.2.2

- fix simplify error

##### 4.2.1

- Fix for drawing geometries outside of the 3857 bounds

##### 4.2.0

- Support for drawing vector data into EPSG:4326 tiles
- Added createStandardWGS84TileTable

##### 4.1.0

- Typescript updates
- Extract converters, leaflet plugin, mobile optimizer, and viewer into their own packages

##### 4.0.0

- Alter tables functions (copy, rename for table and columns)
- Publish separate node and browser module
- GeoPackageJS can now be run in Node.js worker_threads and Web Workers

##### 2.1.0

- Implementation of the Feature Style Extension and Contents ID Extension

##### 2.0.8

- Checks for Electron when returning a tile creator

##### 2.0

- All new API utilizing Promises

##### 1.1.4

- Adds a method to retrieve tiles in EPSG:4326

##### 1.1.3

- Fixes issue #115

##### 1.1.2

- fix case where GeoPackage Zoom does not correspond to the web map zoom

##### 1.1.1

- fix more instances of proj4 bug for react
- fixed tile generation for images with different x and y pixel densities

##### 1.1.0

- accept pull request adding support for react
- fix bug with projected tiles that spanned the date line

##### 1.0.25

- ensure we use proj4 2.4.3 instead of 2.4.4

##### 1.0.22

- Fixed bug where querying for indexed features only returned the geometry instead of the entire feature

##### 1.0.19

- Remove dependency on Lwip
4 changes: 1 addition & 3 deletions lib/context/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ export class Context {
require('better-sqlite3');
Db.registerDbAdapter(SqliteAdapter);
} catch (e) {
console.error(
'Unable to register SqliteAdapter. The better-sqlite3 module was not found. Falling back to SqljsAdapter.',
);
console.error('Unable to register SqliteAdapter. The better-sqlite3 module was not found. Falling back to SqljsAdapter.', e);
// fallback to sqljs adapter
Db.registerDbAdapter(SqljsAdapter);
}
Expand Down
4 changes: 4 additions & 0 deletions lib/db/dbValue.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/**
* DBValue can be a boolean, string, number, Buffer or Uint8Array
*
* TODO:
* This should allow `null` as well, but adding that could be a breaking change to clients.
* Additionally set `"strictNullChecks": true` in tsconfig.
*/
export type DBValue = boolean | string | number | Buffer | Uint8Array;
2 changes: 1 addition & 1 deletion lib/db/sqljsAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ export class SqljsAdapter implements DBAdapter {
bindAndInsert(statement: any, params?: [] | Record<string, DBValue>): number {
if (params && !(params instanceof Array)) {
for (const key in params) {
params['$' + key] = params[key];
params['$' + key] = typeof params[key] === 'undefined' ? null : params[key];
}
}
return statement.run(params).lastInsertRowid;
Expand Down
Loading

0 comments on commit 3981bf0

Please sign in to comment.