[Mapserver-users] EXTENSION parameter in OUTPUTFORMAT removed?
Frank Warmerdam
warmerdam at pobox.com
Tue Feb 25 13:20:22 PST 2003
Vinko Vrsalovic wrote:
> Two OUTPUTFORMAT curiosities:
>
> 1.- is EXTENSION parameter documented in the mapfile reference not
> present?
>
> PHP Warning: MapServer Error in loadOutputFormat(): (EXTENSION):(6)
> in /var/www/html/sexta2.ms/index.php on line 23
>
> The map file:
>
> MAP
> OUTPUTFORMAT
> NAME png24
> DRIVER "GD/PNG"
> MIMETYPE "image/png"
> IMAGEMODE RGB
> EXTENSION "png"
> END
> END
Vinko,
It seems I accidently omitted implementing this feature even though I
documented. I will implement it in CVS soon and email you.
> 2.- I rendered a map with vectors and a raster 8 bits B/W layer. If I
> used the default PNG outputformat, the vectors got rendered in B/W also,
> if i turned the raster layer off, the colors were normal, if I turned on
> the raster layer, all was rendered in B/W.
The problem is that the greyscale raster layer is grabbing 256 greyscale
colors for rendering itself. There are various possible solutions to this:
o Use 24bit output.
o Somehow cause your desired vector colors to be pre-allocated so the
raster doesn't get the whole colormap.
o Convert your greyscale data to a pseudo-colored format and compress
down to a reduced number of colors as part of this process .. I find
32 levels of grey is plenty for must greyscale display.
o I could implementing a processing directive forcing the greyscale
colormap allocator to use a reduced number of colors.
Let me know if you would like me to do the last item. There are various
ways it could be implemented. One is to give the raster color allocator
a "threshold" within which it would consider an existing color a match.
For instance, if you gave a color threshold of 6 then only about 256/3
greyscale values would be allocated. This would also apply to pseudocolored
images that have alot of colors that are very close to one another.
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