felt / tippecanoe

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

error `feature ID is not a number` if it is numeric but not an mvt_double is confusing and possibly incorrect #262

Open dzfranklin opened 1 week ago

dzfranklin commented 1 week ago

I got Warning: Attribute "id"="2568923" as feature ID is not a number. This error message initially made me think I was emitting string feature IDs.

From reading the source I believe this error occurs whenever the column type is not an mvt_double: https://github.com/felt/tippecanoe/blob/51fcf142df1ba33e5d0a6ae6ebc57bae47d0fca3/serial.cpp#L808

In my case this came from a flatgeobuf uint column: https://github.com/felt/tippecanoe/blob/51fcf142df1ba33e5d0a6ae6ebc57bae47d0fca3/flatgeobuf.cpp#L200C1-L200C56

Is the expected usage that I should be emitting floating point feature IDs? Instinctively that feels wrong because I have never seen non-integer feature IDs used.

e-n-f commented 1 week ago

Thanks. I think this is a bug in the flatgeobuf code, since tippecanoe frontends should treat integer and floating point inputs as equivalent. I'll take a look.