JSPM

world-file

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q23180F
  • License MIT

create a world file for an image

Package Exports

  • world-file

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (world-file) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

world-file

generate a world file for data if you give it the dimensions and the corner points. Based off code by Peter Girard translated from C#.

API

worldfile(width, height, corners);

where corners is an object with cooridnates for the corners of the image, in the form

{
  tr: [1, 1],
  tl: [0, 1],
  br: [1, 0]
}

coordinates are geojson style so x,y lon,lat, tr is top right, tl is top left, br is bottom right, input is in lat lon wgs84, output is in web mercator.