Total newbie - cut square map fragment with osmosis

Hi! I have some chinese bike computer, which supports square shaped maps.
So i have .PBF Europe file, which I want to crop to smaller square (with my country basically), and then, convert it with osmosis to .MAP file. I know, how to convert pbf to map but I’m clueless how to crop that.
I have osmosis with mapsforge, so propably I need CMD bbox line. Thanks!

Just a thought - you can probably just download a .pbf for your country?

If it must be a square, try this.

Yes, it must be a square. I tried to apply country-shaped map, but it didn’t work, idk why.
I got bbox numbers from another calculator (55,12.9,47,24.7), so I need only an idea, how to put this together to CMD to make it work

I am not sure what you mean by square as that depends on the map projection you are using. But you can do a lat/lon based extract from a pdf file using osmium see: Osmium manual pages – osmium-extract (1)

1 Like

Basically, I want to extract from a whole Europe PBF file something like on image


Just crop it, to be able to put on by bike computer, previously converting it into .MAP (format that device recognized).
And how to do that, using mapsforge/osmosis?
I’m completely new on these tools, just want to make myself maps, because producer of my computer seems to not update maps at all.

Just for the avoidance of doubt - are you sure that the map data format that your bike computer uses is an OSM .pbf - i.e. have you done this before and did it work?

My computer uses .map (mapforge) format, but converting it from .pbf to .map is simple for me, because I have command lines. Originally, there was asian maps files in .map format, but they’re outdated as hell

1 Like

I haven’t used osmosis for many years ago, but this old script has some example osmosis calls with parameters in it. I’m sure you can figure out something from that.