planas/pbf_parser

Tile Geneation

gelinger777 opened this issue · 3 comments

Hi there! Very interesting GEM. I am interested to understand if its possible to parse data of 1 given square and generate the tile on fly with ruby???

Hi! Sorry for the delay. Honestly, I don't think Ruby is fast enough for this kind of operations. A pure C/Java implementation would be much faster. Anyway, this gem is only intended to deserialize PBF data which most of the time is grouped within a country/region, so you'll need to extract all the data to a temporal storage (probably a postgres db w/ postgis) before being able to query it.

Another approach would be to seek through the whole file looking for those data that is inside a given boundary box and then keep the results in memory for generating whatever you want, for small tiles this should be fine.

Hope it helps.

Hi! The problem I am facing now is to generate tiles on mobile device in an app made with Rhomobile framework. rhomobile has possibility to make extensions on C but its very complicated, so i am searching a way to generate it via Ruby from pbf or sqlite(Spitalite).
Any advise appreciated.

Sorry, haven't seen your answer until today. I can't really help you since I have no experience with Rhomobile. Probably you'll receive better advice in stackoverflow