A practical example lead me to believe that a geographical projection, such as the Mercator projection, is an affine transformation.
However, when I checked on Wikipedia:
More generally, an affine transformation is an automorphism of an affine space (Euclidean spaces are specific affine spaces), that is, a function which maps an affine space onto itself while preserving both the dimension of any affine subspaces (meaning that it sends points to points, lines to lines, planes to planes, and so on) and the ratios of the lengths of parallel line segments. Consequently, sets of parallel affine subspaces remain parallel after an affine transformation.
This isn't true when it comes to Mercator: parallel lines on the surface on a Mercator map aren't paralell on the surface of a sphere.
However, in practical applications, affine transformations seem to be describe the mapping from a spherical surface to a plane and vice versa. Ie the documentation of the affine package within Python language, says:
Georeferenced raster datasets use affine transformations to map from image coordinates to world coordinates. The affine.Affine.from_gdal() class method helps convert GDAL GeoTransform, sequences of 6 numbers in which the first and fourth are the x and y offsets and the second and sixth are the x and y pixel sizes.
Ie this description claims that an affine transformation maps from planar to spherical surface.
What am I getting wrong here? Are there more than one definition of the term affine transformation (one mathematical, and one used by geographers), or am I making a mistake somewhere else?