[mapserver-users] SCALE definition + OGR StyleItem Auto with MapInfo TAB
Frank Warmerdam
warmerdam at pobox.com
Fri Nov 29 06:09:17 PST 2002
Lars V. Nielsen wrote:
> Hi Frank,
>
> Thanks for taking up this issue.
Lars,
Well, I haven't exactly taken it up. I am not promising much followup,
but might have done some fixes if styleitem auto support was badly broken.
> After more investigation this morning, I found that it seems it was my
> raster backdrop that distorted the colors. When viewed alone they appear the
> same as in MIPro.
>
> HOWEVER, the raster backdrop shouldn't change the color of polygons (or nay
> vector features) put on top of it, should it ??? It certainly doesn't in
> MapInfo Pro.
The problem is that in 256 color mode it is entirely possible for a
raster layer that is drawn first to "consume" all the colors in the palette.
When this happens all subsequent vector drawing has to pick the closest
available color from the paletted fixed by the previous layer draw.
One solution to this is to "pre-color-compress" raster layers to use less
than 256 colors. Another is to produce 24bit images, but this option is
only available in 3.7 (cvs).
I have also been considering adding a processing option to 3.7 to add
a "color tolerance" for raster layers, allowing some degree of color
compression for raster layers. This can be especially useful for greyscale
layers which can consume 256 colors when 32 shades of grey would have given
the user essentially equivelent color detail.
Note, I haven't unpacked and inspected your images to ensure that this is
the problem that you are encountering, but I find it hard to imagine it
could be anything given the description.
> I've calculated that 1:1 corresponds to 79,370,000 pixels. Is this an
> arbitrary value, or ... ?
I'm not the scale expert. Hopefully someone else will respond. There are also
extensive discussions of scale issues in the email archive within the last
eight weeks ... do some digging.
I have taken the liberty of cc:ing this response to the mailing list since
the color issue is a common problem.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the MapServer-users
mailing list