geojson-tidy icon indicating copy to clipboard operation
geojson-tidy copied to clipboard

fails when asked for diff sample rate

Open sbma44 opened this issue 9 years ago • 3 comments

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 avatar Aug 13 '15 02:08 sbma44

@sbma44 saw your comment that the problem was in the exported trace. Is this still open?

planemad avatar Aug 13 '15 11:08 planemad

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?

sbma44 avatar Aug 13 '15 14:08 sbma44

Is this caused by https://github.com/mapbox/geojson-tidy/issues/16 ?

ZephD avatar Apr 12 '19 14:04 ZephD