Skip to content

Example: Create a new GeoPackage #185

Open
@bertday

Description

@bertday

Hello — thank you for this awesome library!

I am a new user and would like to know how to create a new, empty GeoPackage. I'm having some trouble hunting down an example of how to do this. I see there a method GeoPackageAPI.create(), but it's not entirely clear to me how to use it. When I run this code:

import { GeoPackageAPI } from '@ngageoint/geopackage';

(async () => {
  const gpkg = await GeoPackageAPI.create('/Users/me/test.gpkg');
})(); 

I get Error: Unable to initialize canvas.

Having a minimal example of this would be super helpful — thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions