mapbox/geobuf

Uncaught Error: Unimplemented type: 7

Closed this issue · 6 comments

I'm unable to decode an encoded GeoJSON file, could not find any solution to this error.
Encoded with json2geobuf command that comes with the package. Plain GeoJSON file is correct and works as expected, just loads a long time (~7.7MB), that's why i'm looking to implement geobuf.

$.ajax(
            '/store.1.encoded.json',
            {
                accepts: {
                    geobuf: 'application/geobuf'
                },
                converters: {
                    'text geobuf': function(result) {
                        return result;
                    }
                },
                dataType: 'geobuf'
            }
        ).done(function (data) {
                var pbfData = new Pbf(data);
                var $geojson = geobuf.decode(pbfData);
});

The file i'm trying to process is this, change extension to whatever, otherwise github didn't accept it:
store.1.encoded.txt

Can you share your original GeoJSON file?

tmcw commented

@psihius - can you share the original GeoJSON file? We'd need more information to debug this.

@tmcw @mourner sure, I missed the first comment by @mourner (no notification came in), so sharing now
store.1.geojson.txt

@mourner @tmcw Any news on this issue?

@psihius sorry, went off my radar, but I'll be sure to check it out this week.

It looks like it works fine with pbf@1 (stated in dependencies) and pbf@2, but breaks with pbf@3 which had breaking changes. While I update geobuf to work with pbf@3, just change your pbf version to a compatible one.