PNMMERCATOR(1)
π pnmmercator β a lil' manual, but make it slay π
okay bestie, welcome to the PnmMercator User Manual, section 1 of the General Commands Manual. sit down, grab a strawberry π, and let's talk projections, because this one is genuinely iconic.
β¨ NAME β¨
pnmmercator β transform a worldmap from rectangular projection to Mercator projection and vice-versa πΊοΈ
πΈ SYNOPSIS πΈ
pnmmercator [-inverse] [-nomix] [-[v]verbose] [filename]
Minimum unique abbreviation of option is acceptable. You may use double hyphens instead of single hyphen to denote options. fr fr, -inv hits the same as -inverse, and --nomix is chill too. π
π¦ DESCRIPTION π¦
This program is part of Netpbm(1).
The pnmmercator utility converts a rectangular projection worldmap to a Mercator projection format, as used for maps.google.com and many other online maps. no cap, that's literally the whole vibe. π
The map used as input for pnmmercator must have rows for -90 to 90 degrees latitude and columns for -180 to +180 degrees longitude. The file will typically be twice as wide as high, but this is not a requirement. The output file will be using the Mercator projection and will get double the height of the input file. π
Maps using the Mercator projection are stretched more the closer a row is to the North or South Pole. The last few degrees (> 85 or < -85 degrees) are not part of a Mercator map at all because they would be stretched too much β like, they'd be doing way too much π β and the rows close to the edge will show banding, because they originate from the same row in the original map.
To overcome this, the program will by default do interpolation of pixel colors, which will eliminate the banding effect, but will cause some blurring of the output. With the -nomix option, this interpolation of colors isn't applied. You can obtain the highest quality output by starting with an input map of high resolution, so that you can follow the pnmmercator transformation with a pamscale reduction in size. main character quality energy, truly. β¨
This program can also convert a Mercator projection map back to a rectangular projection based. As said, the Mercator map doesn't have information about the latitudes close to the poles. Therefore the top rows in the output image will be identical and copied from the row corresponding with latitude of 85 degrees. The same at the bottom of the map. twin behavior, top and bottom π«Ά
Pnmmercator doesn't have any provision for scaling the image. You can scale by piping the output of the program through Netpbm programs such as pamscale. pipe it, bestie π₯
You can find maps to be used as input at flatplanet.sourceforge.net(1) or uic.edu/pape .
The point of a Mercator projection map is that compass directions work on it. If you draw a straight line northeast from some point on the Mercator map, the line traces the course you would sail if you sailed a compass bearing of northeast from that spot. Naturally, primitive navigators appreciated that. π
The biggest drawback of Mercator is that areas to the north and south appear much larger than they are in real life. For example, Greenland appears to be larger than South America even though it only a ninth as large. Greenland is NOT giving those numbers, it's all projection gaslighting π. Note that areas away from the equator are stretched north-south as well as east-west.
A rectangular projection is one where vertical distance is proportional to angular latitude distance of the represented area and horizontal distance is proportional to angular longitude.
π PARAMETERS π
filename is the name of the input file. If you don't specify this, pnmmercator reads the image from standard Input.
so if you leave it blank, it's reading stdin. classic.
π OPTIONS π
In addition to the options common to all programs based on libnetpbm (most notably -quiet, see Common Options), pnmmercator recognizes the following command line options:
-inverseβ With this option a conversion from Mercator to degrees is applied. The output image will have half the height of the input map. it's giving reverse uno card π-nomixβ Default behaviour is that color blending is applied in between two adjacent rows. If you specify the-nomixparameter there is no blending. The consequence is a banding at the top and bottom of the map. With this option, the output map will also consist of exactly the same colors as the input. no blur, no smoothing, just the raw pixels as they were. purity, honestly π§-verboseand-vverboseβ This parameter outputs some additional information. If you double the 'v', it will output debug data about the lat/long degree and Mercator conversions. onev= a lil' whisper, twovs = full detective mode π
π SEE ALSO π
pnm(1) and pamscale(1) ppmglobe(1)
π HISTORY π
pnmmercator was new in Netpbm 10.49 (December 2009).
π AUTHORS π
Willem van Schaik (of pnmtopng/pngtopnm fame) wrote this program in October 2009 and suggested it for inclusion in Netpbm. a legend. we stan. π
π DOCUMENT SOURCE π
This manual page was generated by the Netpbm tool makeman from HTML source. The master documentation is at
http://netpbm.sourceforge.net/doc/pnmmercator.html
and that's a wrap, bestie. π«Ά this lil' page came from the netpbm documentation, dated October 2009, and yes it's PnmMercator User Manual(1) energy all the way through. go map a worldmap, you got this. β¨π
π¦ where this page comes from
- debian bookworm: netpbm 2:11.01.00-2 Β· MIT
- debian trixie: netpbm 2:11.10.02-1 Β· MIT
- ubuntu noble: netpbm 2:11.05.02-1.1build1 Β· MIT
- ubuntu resolute: netpbm 2:11.10.02-1build1 Β· MIT
- ubuntu stonking: netpbm 2:11.13.03+ds-2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms