Hello,
my question in short:
What’s the recommended size of a raster database, relative to the size of the map that you’re about to create?
The long version:
Let’s say going to create a map using a pseudocylindrical map in equatorial aspect. You need it to be 2700px in width at the equator.
So, I guess the width of the raster database, using the geographic projection, should at least have a width of 2700px, to. But likely, it’s better if the input image is larger than this – but how large? Probably that’s closely related to the way Geocart’s PixSlice™ raster reprojection technology works…
Well, I assume the most accurate answer is "It depends" of "The larger, the better" … but is there some rule of thumb?
I ran a few tests.
I exported a map three times, always using the same projection at the same size of 2700px width. As raster database, I used
A) an image having a width of 2700px, too,
B) one with a width of 5400px,
C) one at 10800px.
… the image of run C was the original image (HYP_50M_SR_W.tif of the Natural Earth’s "Cross-blended Hypsometric Tints") which I scaled down myself for A and B.
The result of B was clearly better than the result of A – but the result of B and C were almost indistinguishable. At least, in terms of quality.
Which means, yes, I can spot certain differences but (for me) it’s hard to say which one is better. Moreover, these differences might well be the consequence of the interpolation method used in the scaling process (Catmull–Rom in this case) rather than being a characteristic of PixSlice™.
So, the rule of thumb I asked for could be along the lines of:
"Use a raster database that’s about twice as large as the map you’re going to build. It doesn’t hurt if it’s even larger, but it doesn’t help a lot either."
(Note: "Twice as large" is referring to the width only here. Of course I know that you have to take the height into account as well.)
But is this a valid rule of thumb?
Or did I miss something, or did I jump to conclusions or something like that?
Kind regards,
Tobias
Recommended size of raster database?
Re: Recommended size of raster database?
As you might suspect, the answer is complicated.
The less difference between source and destination projections, the less extra information you need for it to look good. Conversely, the more the source gets distorted, the more information needed for it to continue to look good. The reason for this may not be obvious.
Here is a simple example. Imagine some text on a simple rectangular map. Imagine the letter H, and imagine that, in the source, the vertical and horizontal bars happen to coincide precisely with pixel boundaries, sharply. The bars are all one pixel in width or height.
Now let’s say you deform this map to another rectangular projection of the same width but different parallel spacing. It’s reasonable that the verticals will still be perfectly sharp verticals, but the horizontal may well end up spanning two pixels in height, but each being 50% gray instead of black. Here, extra detail wouldn’t really matter.
But let’s say now that the target projection is sinusoidal, and that the H is in the northern latitudes, outer meridians. This H will be heavily skewed such that a single original pixel can get smeared over several pixels in the target. That in itself does not cause a problem, but now, suddenly, the meaning of the original pixel boundaries becomes unclear. If we just make a slanted line out of one of the vertical bars of the H, how do we represent that? Does the original image literally mean “independent” squares of black, or does it mean a continuous stroke? If it is independent squares of black, then when you tilt it 45° (for example), maybe you should have squares of full black as target pixels, with no bleed of black into adjacent pixels. If, on the other hand, they are supposed to mean a continuous stroke, then maybe it is better to render as gray pixels throughout, with pixels closest to the “core” of the stroke being darkest, and surrounding pixels carrying a fraction of gray determined by their distance.
If the source is higher resolution, then the question of the edge pixels goes away (or at least gets shoved down to a finer level of detail). That is because the diagonal questionable pixels now have color (or not) to inform how the jagged edges should get filled in.
In summary, the more distinct the two projections are from each other, the more detail you will need. Technically, that need is unbounded, since there is no bound to the possible difference in distortion between the two projections.
Does that help?
— daan
The less difference between source and destination projections, the less extra information you need for it to look good. Conversely, the more the source gets distorted, the more information needed for it to continue to look good. The reason for this may not be obvious.
Here is a simple example. Imagine some text on a simple rectangular map. Imagine the letter H, and imagine that, in the source, the vertical and horizontal bars happen to coincide precisely with pixel boundaries, sharply. The bars are all one pixel in width or height.
Now let’s say you deform this map to another rectangular projection of the same width but different parallel spacing. It’s reasonable that the verticals will still be perfectly sharp verticals, but the horizontal may well end up spanning two pixels in height, but each being 50% gray instead of black. Here, extra detail wouldn’t really matter.
But let’s say now that the target projection is sinusoidal, and that the H is in the northern latitudes, outer meridians. This H will be heavily skewed such that a single original pixel can get smeared over several pixels in the target. That in itself does not cause a problem, but now, suddenly, the meaning of the original pixel boundaries becomes unclear. If we just make a slanted line out of one of the vertical bars of the H, how do we represent that? Does the original image literally mean “independent” squares of black, or does it mean a continuous stroke? If it is independent squares of black, then when you tilt it 45° (for example), maybe you should have squares of full black as target pixels, with no bleed of black into adjacent pixels. If, on the other hand, they are supposed to mean a continuous stroke, then maybe it is better to render as gray pixels throughout, with pixels closest to the “core” of the stroke being darkest, and surrounding pixels carrying a fraction of gray determined by their distance.
If the source is higher resolution, then the question of the edge pixels goes away (or at least gets shoved down to a finer level of detail). That is because the diagonal questionable pixels now have color (or not) to inform how the jagged edges should get filled in.
In summary, the more distinct the two projections are from each other, the more detail you will need. Technically, that need is unbounded, since there is no bound to the possible difference in distortion between the two projections.
Does that help?
— daan
-
- Posts: 446
- Joined: Fri Nov 07, 2014 2:43 am
Re: Recommended size of raster database?
Yes, I suspected that, but…daan wrote:As you might suspect, the answer is complicated.
It does.daan wrote: Does that help?
Thanks a lot for the detailed example!

Kind regards,
Tobias