I need OSM data in equirectangular projection.

I’m making a world map poster and I’m using various data sources to construct it. In the end it’s going to be a rendering of the planet using “Civilization” type hex tiles. Basically rendering the world as if it was a game. I’m going to be adding an incredible amount of detail. most relying on game iconfiy. (I’m not using graphics from any “Civ” game and using my own art, but it will be very “Civ” like).

My base data set is a world map 8192x4096 pixels big using a equirectangular projection. I picked this as I can find lots of data with this projection that I can line up, the latitude and longitude lines are square, and the projection looks pleasing to me.

How the system is going to render a hex is that the data map is going to be made up of “layers” with each pixel representing some data. One layer will be the hightmap, one will be the biome, one will be country boundaries, one river, and one roads, and maybe one for train lines. Then I’ll pull from other databases cities, location, and population.

There is a particular render from OSM that I love that I want to use for rendering roads. It’s when the map is selected at “Standard” and the zoom is at 100 km.100 mi I want to just take all the red/pink/orange lines that make up the major highways.

Obviously at this scale I can’t take the SVG, which is OK as I’m looking for a raster image anyway. But the big issue is projection. I have no problem just screencapping the world and stitching to together, (And removing all the unneeded data except for the red/ping/orange pixels).

Sadly, I have discovered that turning a Mercator projection into a equirectangular one is more than just squishing the Y access. It’s because Mercator is all stretched at the poles. Gimp doesn’t have a warp function that has control over particular areas, only the matrix as a whole. My solution will be that I will have to write a program that will remove a particular number if lines near the poles and remove less and less as it approaches the equator. Unfortunately, I’m also pretty garbage at math too, and I’m sure would be easier to apply some kind of sine/cosine function, but I failed basic algebra three times in college and never did anything involving circles.

I guess the upshot is is there a program or something that can take a world map as an input and spit out a different projection as an output? I mean there has got to be as Wikipedia has all kinds of projections from what appears to be the same map. Better yet, can OSM optionally display an equirectangular projection that I can screencap and stitch?

Road colouring is not part of the OSM map. That is decided by the renderer and varies with both time and the renderer.

You need to start with the actual OSM vector maps in native format and render them yourself. The coordinate system will map directly to your proposed projection. Current tile servers have to impose the complex transformations that you mention, before rendering, so you need to build a tool chain that misses out that step.

QGIS?: https://www.qgis.org/en/site/

I think the OP means a rendered bitmap, not a vector map. I suspect QGis is designed for transforming vector maps, not for distorting bit maps.

Yea, I’m pretty much using raster data. I can use the “screenshot and stitch” like I said above and then apply a scale by removing x amount of lines x away from the equator until I get latitude lines that are square. I’m sure there there is an equation for this, but I can probably make due with trial and error. That is unless anyone knows off the top of their head.

Thinking out loud:

The ending bitmap is going to be 8192x8192 as Mercator is square. The target map is 8192x4096. This means I’ll need to remove 4096 lines. That’s 2048 from each hemisphere. Hold on I may be able to suss this out thinking out loud.

For fun, let’s put 0 at the equator. Latitude lines will go up to +4096 and down to -4096. If I go up, I can’t remove every other line because that doesn’t scale the top more than the center. I’ll have to count up x amount of lines, remove that line, and then count up x minus some factor and remove the next…

That “some factor” is… where my math abilities end. I have no idea what the scale is or even how to scale that. I took a look at the Wikipedia entries for both projections and they are throwing unhelpful Greek letters at me that might as well be… well… Greek.

I’m sure smarter people know the magic numbers I’m looking for

This projection is known epsg:4326 - rather usual and simple stuff.

Why don’t u use OSM? Using an “external” bitmap (please link) has nothing to do with OSM.

Fetch the Osm database (planet.org) and extract what you need.
And/or use services which supply you with data: e.g. https://wambachers-osm.website/boundaries may give you the country borders of the world (and much more)


If the OP has the willingess to style his map himself by downloading some vector data, he should be able to project it in any projection QGIS supports, and then export the layout in the required projection to an image:


This prevents image quality loss due to the distortions required for reprojecting / warping the raster images of an already rendered map.

However, if the latter is not considered an issue, I am quite sure you should be able to do this as well without issues in QGIS by adding any downloaded tiles to QGIS, or opening OpenStreetMap layer directly in QGIS using the Open Layers plugin:


However, the quality of the last two options will be heavily affected by the limited raster resolution of the tiles. Styling vector directly in QGIS and then exporting to image should not have this limitation.

It’s all magic!

Das ist nicht nur nicht richtig; es ist nicht einmal falsch!

Mercator and equirectangular are not the same projection at all. Neither are square. Mercator is infinitely tall as the tangent of 90° is infinity. Equirectangular is twice as wide as it is tall as it is 180° from North Pole to South Pole and 360° around the Earth and is just plotting the data at the latitude and longitude of the feature.

From what you said, you never studied circular trigonometry. The circular trigonometric functions for which you are searching for the Mercator to equirectangular reprojection is the tangent and arc tangent functions.

The OSM location data is stored in latitude and longitude form with attribute tag to tell what is at that location. These locations are used to describe ways (paths, has ends) and polygons (has no ends). To render a map is to select the desired data, project the coordinates, generate SVG or its equivalent and reduce those data to a raster map. The only mandatory step is select the data.

Using OSM data implies that your resultant map needs to under the same license as the OSM data itself. This means that you may not copyright your game board. You have similar issues if you base your gameboard on anyone else’s map as that is a copyright violation.

But, of course, you could use the SVG instead at any scale. It would be much easier to select and recolor what you want and then reproject using the arc tangent function on the latitudes if the original SVG was projected to Mercator.

No, there does not have to be a raster map reprojection program. Wikipedia uses latitude and longitude data and projects it to the desired map projection. The result is map in a wide variety of projections.

If 2x+1=7 confuses you, then try 2☐+1=7 where you need to discover what goes in to the “box”. To a mathematician, 2λ+1=0 is the same problem.

Solving such an equation is like opening presents: first take off the ribbon, then the wrapping paper, unseal the box then take out the present.

Solution (one needs to do the same thing to both sides of the equation):
2x+1=7 → 2x+1-1 = 7-1 → 2x+0 = 6 → 2x = 6 → ½ 2x = ½ 6 → 1x = 3 → x = 3

Of course, *Εἶναι γιὰ μένα κινέζικα * (translation: Для меня это китайская грамота.)

I think Εἶναι γιὰ μένα κινέζικα would translate into the American English idiom “It’s Greek to me.”

I’m not going to use the road data directly. In fact, that will defeat the purpose. I’m creating something artistically unique from a Hodge-podge of sources. It’s really no different then what Randall Munroe from xkcd does all the time. (Man that was hard link all those :slight_smile: )

Not only that, new artistic expressions are derived all the time from data. (In the above case the data was taken from here).

The data will be turned into a simple single-bit pixel array, where it will become part of a layered bit plane. Besides the rasterization process, the result will be pretty worthless as a “map” in any sense. When it comes to rendering the hexes, each location on the array will be sampled and converted into into a binary number. The “road” pane will be used to create one of 16 hex “road” overlays (similar to this) and rotated appropriately. This will be overlayed to the biomes texture and dressed up automatically to fit the game theme. This will be done with river and railroad tiles too.

The idea is that all I’ll have to do is press a “render” button and it will become an interesting piece of my own computer art.

Just to put your minds at ease though, I reviewed the ODbL I’ll be more than happy to release the bitplane data (and it’s format) when I’m done. (The other bitplanes are coming from NASA) It will be pretty useless without a renderer, but nothing stopping anyone to make their own. I guess.