mapbox / tippecanoe

Build vector tilesets from large collections of GeoJSON features.
BSD 2-Clause "Simplified" License
2.73k stars 431 forks source link

EOF message still prints with --quiet flag #961

Open jdmcbr opened 1 year ago

jdmcbr commented 1 year ago

I have geojson point datasets that I'm converting to tilesets. I've been seeing the "Reached EOF without all containers being closed" message that is referenced in https://github.com/mapbox/tippecanoe/issues/191, and understand that the messages can be safely ignored in my context. However, I was still interested in quieting those messages (so that I could more easily find the messages I do need to pay attention to), and the --quiet flag doesn't seem to be doing the trick.

$ tippecanoe --minimum-zoom=10 --maximum-zoom=15 --quiet --no-feature-limit --read-parallel points.geojson -o points.mbtiles
points.geojson:580: Reached EOF without all containers being closed
In JSON object {"type":"FeatureCollection","name":"points","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS84"}},"features":[]}
points.geojson:574: Found ] at top level

Is this expected behavior? Perhaps this is considered an error, and not a warning, and thus still prints? Ideally tippecanoe would recognize the case described be @e-n-f in #191

If your file actually does have one feature per line, and just has a FeatureCollection around them, then the messages are harmless and just refer to one thread reaching the end of its input with the FeatureCollection it started parsing

and not print the message at all, but having the --quiet flag actually work would be nice if it isn't possible to recognize circumstances where the message is harmless.

Version:

~ $ tippecanoe --version
tippecanoe v1.36.0
e-n-f commented 1 year ago

Tippecanoe is now maintained at https://github.com/felt/tippecanoe

This message is the result of using the -P/--read-parallel flag on regular GeoJSON (as opposed to newline-delimited GeoJSON) input. I would recommend either not using parallel parsing, or formatting the input in a way that can be parsed in parallel without warnings.

jdmcbr commented 1 year ago

Oh, thanks @e-n-f , I didn't notice any message about it having migrated to the felt organization before posting. Should I transfer this there?

I understood from the other thread that that was the recommended course. Parallel parsing provides a nice speedup though, and I haven't found how to format the input so as to avoid the warning without then rendering the geojson in ways that hinder its use in other applications. That's why I asked if it was expected for the --quiet flag not to actually quiet those messages.