mapbox / mapnik-omnivore

Node module that returns metadata about spatial files.
45 stars 19 forks source link

Mapnik CSV error handling #157

Closed who8mycakes closed 7 years ago

who8mycakes commented 7 years ago

Breakdown of the problem

An instance of a csv with an empty string erred because the error message was > 256 characters.

The headers in the file triggered the error because the index column was an empty string, which violates a check in Mapnik.

What could be fixed/addressed?

Technical approach

Dependencies:

The changes to Mapnik-omnivore are a bugfix and won't be a breaking change, and will merely be a patch release.

Questions:

/cc @springmeyer @GretaCB @artemp @mapsam @flippmoke

artemp commented 7 years ago

@who8mycakes - in my view we should be able to process this file replacing an empty column name with automatically generated name e.g "_1" . I'm going to look at fixing this in mapnik core.

I'm also in favour of truncating redundant error message: "this is required for reading geometry data" is not adding anything and should be removed.

artemp commented 7 years ago

https://github.com/mapnik/mapnik/commit/7c6f335fa5b2194a2d52a6b78d2c02f056c29289 /cc @who8mycakes @springmeyer @GretaCB @mapsam @flippmoke

mapsam commented 7 years ago

CSV errors are being handled in mapnik-omnivore now! Updates in mapnik will be great whenever node-mapnik is released. Considering this closed now.