Skip to content

Provide more meaningful error messages #6

Description

@glifchits

Trying to integrate this module into an app I get:

  Error: Unsupported geometry type
      at features.forEach (/app/node_modules/mvt-encoder/tileEncoder.js:139:32)
      at Array.forEach (<anonymous>)
      at encodeFeatures (/app/node_modules/mvt-encoder/tileEncoder.js:138:12)

(provided EWKT from PostGIS, not a WKT)

or

  TypeError: Cannot read property 'count' of undefined
      at encodeGeometry (/app/node_modules/mvt-encoder/tileEncoder.js:74:45)
      at features.forEach (/app/node_modules/mvt-encoder/tileEncoder.js:144:17)
      at Array.forEach (<anonymous>)

(probably because I provided a MULTIPOLYGON)

Test cases to check:

  • Unsupported input geometry (require WKT)
  • Unsupported geometry during encoding (only support POLYGON for now)
  • Coordinates not scaled to tile extent (forgot to translate them)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions