ibesora / vt-optimizer

A small NodeJS cli tool to inspect and optimize Mapbox Vector Tiles files
MIT License
66 stars 12 forks source link

Type Error: Cannot create property 'context' on String #11

Closed shahzadbacha closed 3 years ago

shahzadbacha commented 3 years ago

Hi,

I have been exploring vt-optimizer for inspecting vector tiles and it did give me a useful insight on my mbtiles, generated with tippecanoe (https://github.com/mapbox/tippecanoe).

When i try to run it for possible optimizations, using the below command;

node --max-old-space-size=66386 index.js -m pois.mbtiles -s style.json -o files/wikipedia_v2.mbtiles

it gives me the following error;

image

ibesora commented 3 years ago

Can you provide the mbtile file you are using? I'd love to take a closer look at the internal structure of it.

shahzadbacha commented 3 years ago

Sure, please have a look at the attached file.

natural_earth.zip

shahzadbacha commented 3 years ago

Hey @ibesora, did you find the time to look into the structure of the data?

ibesora commented 3 years ago

Yup, sorry for not answering before. All the mbtiles I've seen until now have a images table where all the data is stored. Yours has a tiles table instead. I'm working on a fix but unfortunately I'm leaving for 15 days tomorrow and I won't have my computer with me so I won't be able to work on this. If I can finish it today I will ping you but I'm not sure I will be able. Sorry

ibesora commented 3 years ago

Ok, I've just pushed some changes that should fix this. I've tried your natural_earth mbtile with a style I had and it worked. Can you please download the updated version and check if it works? Thanks!

shahzadbacha commented 3 years ago

yes, it works now! Thanks so much.

ibesora commented 3 years ago

Closing this then!