geojson-tidy
geojson-tidy copied to clipboard
fails when asked for diff sample rate
I have a trace I'd like to simplify -- see here gist
When I specify a sample rate other than the input (1s), only two points are returned gist
If I use the 1s input sample rate, I get back something with 100 points that looks pretty good (input is 900+ points) gist
This is a problem because the map matching API seems to expect data samples at 5s intervals.
cc @planemad
@sbma44 saw your comment that the problem was in the exported trace. Is this still open?
Yeah, left this open because I'm still curious about the behavior. My problem was having multiple LineStrings in the submitted FeatureCollection. geojson-tidy
produced okay results when minimumTime
is set to 1 but not when set to 5.
When the traces are combined, however, the default value (5) works fine. So I guess this is okay to close, though perhaps it would be desirable to throw an error when there's more than one feature?
Is this caused by https://github.com/mapbox/geojson-tidy/issues/16 ?