0

I'm working on mobile app and I want to use OSM as its free solution. Whats the purpose of application?

User is geotargeted and the map like this: http://mc.bbbike.org/mc/ appears. No POI, buildings number etc. All I need is map with roads and buildings. Then if user is moving, we can track that and next tiles are loading when needed. Nothing fancy i think.

I came across few problems and items I don't understand. I know there are tiles (graphic) and .osm or .map file. I'm trying to understand how its working together.

What is the purpose of .osm file? From what I saw its just XML file with roads, POI, etc. If I need only streets and their name can do I even need this? Maybe it could be served by tiles?

Can someone explain me how tiles and xml file are working with each other?

1

The .osm file is the raw data that you can download from the OSM server. It contains nodes with coordinates and attributes ("tags"), lines with the nodes they are built from, and relations containing nodes, lines or othe relations.

You will need a software that transforms that file to something that can be displayed.

One choice is the Mapnik or tilemill toolchain that produces 256x256 pixel tiles. These need some time to be created, but can be downloaded and displayed fast. www.openstreetmap.org displays them as a web interface. You can take those tiles (as long as you do no bulk download), or create your own tileset using your own style sheet. Style sheets can be XML or CSS format, depending on the software. You can leave out all features you don't want to see.

Another choice are binary files containing vector data. Android and Garmin Maps use this technology. I guess your .map file belongs to these.

  • hmm ok. Now lets assume I have tiles I wanted. So from graphic point of view everything is ready. Now how to delete unimportant things from .osm file while leaving only those that are responsible for showing me (user) as specific point in exact place/coordinates I get from phones gps? Because it looks like I still need such data from .osm file right? – susanoo Jul 20 '16 at 15:09
  • You can not change the tiles, they are only for display. If you want less features, delete the rendering rule from the style file before you create the tiles. No need to edit the .osm file (which might be some GB large). – AndreJ Jul 20 '16 at 15:28
  • If you want to use a mobile data and store the map for offline purposes and want to do additional things such as searching for POIs (geocoding), routing and stuff then you don't need tiles. Instead use a vector map and do your rendering, searching and routing on top of this vector map. – scai Jul 20 '16 at 17:23
  • @scai - so basically there is possibility to get vector maps (as some kind of file? how can I get it?) and render them on users phone? Would it be possible to render for example only roads and buildings without POI's? – susanoo Jul 22 '16 at 7:27
  • 1
    Yes. See Vector_tiles#Android and Vector_tiles#iOS in the OSM wiki for vector map libraries. – scai Jul 22 '16 at 7:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.