OGC GeoPackage NodeJS binding
This library was designed to use the same MBTiles SQLite tile structure.
Install
$ npm install --save geopackage
Usage
const GeoPackage = const gpkg = 'geopackage.gpkg' // Read Image Bufferconst image = fs) // Save Image to Tilegpkg
Features
Name | Description |
---|---|
update | Update Metadata |
save | Save buffer data to individual Tile |
delete | Delete individual Tile |
tables | Build SQL Tables |
findOne | Finds one Tile and returns buffer |
NodeJS Support
Windows, MacOSX, Linux & Electron
- ~4.X~
- ~5.X~
- 6.X
- 7.X (not supported by Electron yet)
API
index
GeoPackage
Parameters
uri
string Path to GeoPacakge
Examples
const gpkg = 'example.gpkg'//=gpkg
Returns GeoPackage GeoPackage
tables
Build SQL tables
Examples
gpkg
Returns Promise<boolean> true when SQL tables are built
update
Update Metadata
Parameters
metadata
Metadata Metadata according to MBTiles spec 1.1.0 (optional, default{}
)
Examples
const metadata = description: 'Example Description' maxzoom: 3gpkg
Returns Promise<Metadata> Metadata
save
Save buffer data to individual Tile
Parameters
tile
Tile Tile [x, y, z]image
Buffer Tile image
Examples
gpkg
delete
Delete individual Tile
Parameters
tile
Tile Tile [x, y, z]
Examples
gpkg
findOne
Finds one Tile and returns Buffer
Parameters
tile
Tile Tile [x, y, z]
Examples
gpkg