mapbox / mapbox/node-wmtiff

Segfault with unknown SRS

Open
#9 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
4
Forks
4
PR merge metrics
No merged PRs in 30d

Description

When running wmtiff with a tiff that has an unknown srs, we get a segmentation fault in [`gdal.suggestedWarpOutput`](https://github.com/mapbox/node-wmtiff/blob/master/index.js#L49), which isn't caught and leads to some nasty things upstream. I think it would be good to wrap the reprojection process here within a `try/catch`, which is pretty standard for node-gdal.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in index.js at line 49, where gdal.suggestedWarpOutput is called for the reprojection. Reproduce the case with a TIFF containing an unknown SRS, then verify that the reprojection failure is caught instead of propagating a segmentation fault upstream.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.