mapbox / mapbox/mapnik-omnivore

Invalid projection

Open
#90 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
44
Forks
17
PR merge metrics
No merged PRs in 30d

Description

Using a tif downloaded from http://www.gisat.cz/content/en/products/data-download, omnivore is unable to determine the projection of this file.

```
digest ~/tmp/strange-projection.tif

/Users/r/gh/mapbox/mapnik-omnivore/lib/raster.js:78
var current = new mapnik.Projection(this.projection);
^
Error: failed to initialize projection with: ''
at Raster.getExtent (/Users/r/gh/mapbox/mapnik-omnivore/lib/raster.js:78:17)
at Raster.getCenter (/Users/r/gh/mapbox/mapnik-omnivore/lib/raster.js:67:8)
at /Users/r/gh/mapbox/mapnik-omnivore/index.js:80:12
at pop (/Users/r/gh/mapbox/mapnik-omnivore/node_modules/queue-async/queue.js:24:14)
at /Users/r/gh/mapbox/mapnik-omnivore/node_modules/queue-async/queue.js:38:39
at /Users/r/gh/mapbox/mapnik-omnivore/index.js:75:7
at Object.oncomplete (fs.js:108:15)
```

`gdalinfo` gives the projection information as:

```
LOCAL_CS["KRON D211",
UNIT["metre",1,
AUTHORITY["EPSG","9001"]]]
Origin = (-907000.000000000000000,-933000.000000000000000)
Pixel Size = (250.000000000000000,-250.000000000000000)
```

cc @GretaCB @bsudekum

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure with the referenced TIFF and `gdalinfo`, then read `lib/raster.js` around line 78, where the empty projection reaches `mapnik.Projection`. Trace how the projection is obtained before `Raster.getExtent` is called. Done means this input no longer fails while determining its metadata and center.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.