I am trying to understand all this map formats for OpenStreetMap and I really got confused. The OSM wiki has lots of information, but it looks like it is spread all over different places and i cannot get solid understanding of all the formats.
I am looking for something that can be used in Android for offline use. I know that there are lots of frameworks or even done apps that use different file formats, but as for me they file formats they use are all huge.
As I understand the most lightweight format supported by OSM is PBF-Binary, and it is raster format, right?
I have found that it's possible to convert it to *.map format that is vector, right?
The size then is about 40% less than PBF-Binary, but it has to be rendered and it will not be as fast as raster, right?
So another question is, what is the most compact OSM map format that can be used for android?
I know one app that i use a lot - MapsWithMe and it has small map files and they are very fast, but i don't know if it uses raster or vector, i know only they use OSM maps, but as i understand they have created their own format based on it or smth like that.
I have come across GeoJson and the map files are very small, not more than several megabytes. So now i'm getting confused why it is so, why then it's not used for mobile development, cause i googled 'geojson android' and no information about it.
Are there any comparison tables of these formats?
So if somebody has a link where i can learn about all this things, could you please give it to me?
Thanks
PBF format is a much smaller alternative to XML. It contains the same raw vector data. You can convert from one format into the other without loosing any information. PBF is smaller and faster because it is binary data whereas XML is plaintext. The OSM wiki has a short overview of common OSM file formats.
I don't know where you got the information that GeoJson is small. The size of a map depends on several attributes. Mainly coverage and detail. Usually you don't want to have an offline map covering the whole world on your device because it will be very large. Most of the time you just need a small area, like a country. And often you don't need every information OSM can offer. Roads, cities and important POIs are usually sufficient for routing and searching.
You didn't tell us what you want to do with the map. Just drawing it? Or do you also need a routing and search functionality? What map format would be the most useful for you depends on your use case.
There is already lots of software for Android using OSM, including various open source programs. You can take a look at them if you need inspiration for your software.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With