This question is a related to Proximity (raster distance) using ellipsoidal distance
What I'm trying to do is to generate a map of distances to roads. At any given point on a map, I want to be able to instantly say: "you are X kilometres away from a main road".
So my initial thoughts were, get road information from OSM, or draw them, and generate a distance map using Raster -> Analysis -> Proximity (Raster Distance) (after rasterizing that road vector layer).
The problem however seems to be that the Proximity algorithm isn't aware of any CRS. It simply calculates the distances naively without any transformation. Consider the following trivial example
That's one long road all the way from Africa to Russia in one "straight" line (at least on the map). I rasterized this road and then used the Proximity tool with a cut-off of 500 km, and georeferenced coordinates, and this is what I got:
So clearly this tool does not take into account any stretching of the map. Which results in a straight line with a uniform distance gradient. This means that depending on the position on the map, the sampled distance on the proximity layer is reasonably correct near the equator and completely off the more north or south you go. Which obviously makes sense if the generated distance map is based on Cartesian calculations and not ellipsoid calculations.
Is there any way for me to warp, transform or modify this distance map so that it more closely resembles the CRS I'm using (EPSG:3857)? Accuracy isn't a big problem; it's okay to be a few hundred meters off. As long as I'm able to process the road network of the large portion of the Earth in one go, I'm very happy.









EPSG:3857if needed. – Babel Dec 14 '21 at 20:26