orangeadam3 / terra121

A Minecraft Terrain Generating Mod for Cubic Chunks 1.12.2. attempting to generate real terrain, biomes, and features on a 1:1 scale
MIT License
280 stars 41 forks source link

Equirectangular Projection vs Equal Area Robinson #18

Open 49waves opened 4 years ago

49waves commented 4 years ago

I understand that this project has selected the equirectangular projection, but the whole aim of the project is 1:1 representation and the equirectangular projection fails quite dramatically at this aim by expanding distances east-west closer to the polls. In London, the city will be nearly twice as wide east-west than north-south (meaning that all blocks despite being square will only represent rectangular prisms of 0.5m by 1m x 1m). If the original shape of London was a perfect circle, in the equirectangular projection it will be an oval. There are projections that better represent equal area. This is a good article to read on comparisons of how each projection fares.:

  • 90% Goode homolosine projection [with empty water in the gaps]
  • 85% Ginzburg V
  • 82% Robinson

While Ginzberg V would be best because it allows for a better representation of the poles. The Robinson Projection is widely familiar and easily calculated with the following formula:

Coordinates of points on a map are computed as follows:[7][9]

x = 0.8487 RX(λ-λ0) y = 1.3523 RY

where R is the radius of the globe at the scale of the map (6,370,000), λ is the longitude of the point to plot, and λ0 is the central meridian chosen for the map (both λ and λ0 are expressed in radians).

Simple consequences of these formulas are:

  • With x computed as constant multiplier to the meridian across the entire parallel, meridians of longitude are thus equally spaced along the parallel.
  • With y having no dependency on longitude, parallels are straight horizontal lines. https://en.wikipedia.org/wiki/Robinson_projection

With this simple formula, navigation could still be programmed to use latitude and longitude while creating a balanced map that is much closer to equal area while preserving aesthetics and understanding of the map.

orangeadam3 commented 4 years ago

This mod has quite a few options for projections, two of them equal area (sinusodial and equal earth (based on Robinson)) and mercator which preserves angles in addition to equirectangular in the customize world settings. You can read PROJECTIONS.MD for more info. The one thing equirectangular has going for it is it's by far the fastest from a computational standpoint but the options are there if you would like a different world.

49waves commented 4 years ago

I gave the file a read - A very good summary. The equal earth is wonderful and new, but I wonder if the simplicity of the Robinson Projection would be more beneficial as an option to provide over equal area from a computational standpoint?

orangeadam3 commented 4 years ago

I belive equal earth is based on robinson. It does look computationally easier to compute. I'll probably add a bunch later on. If you know some java you can pull and try to implement it. Just use one of the others like equal area or sinusoidal as a template for the class and add it to the main registry in GeographicProjection.