[mapserver-users] Raster
Frank Warmerdam
warmerdam at pobox.com
Mon Feb 4 06:51:29 PST 2002
Miroslav Sodja wrote:
> Hi all,
>
> I have questions about raster data.
>
> Layer with raster data has 38 images; images are about 4500 pixel width,
> and 6000 pixel height with 2 colors. I have tile index of those images.
> The problem is that every image has border with no data. And that border
> goes across the data of neighbor image. The image should be transparent.
> There is no problem if I have png file format with transparent
> background and map file look like that
>
> LAYER #raster 50.000
> NAME "IME_50"
> TILEINDEX "raster/ko_50.shp"
> TILEITEM "PNG_NAME"
> TYPE raster
> STATUS ON
> MAXSCALE 60000
> CLASSITEM "[pixel]"
> CLASS
> EXPRESSION ([pixel] <1 )
> COLOR 0 0 0
> END
> END
>
> But response of IIS and MapServer in that case is very slow.
>
> If I have tiff file format of those images I have white space around
> every image in layer but response of IIS and MapServer is fast. Map file
> is the same except:
>
> TILEITEM "TIF_NAME"
>
> I can't cut border with no data because images are deformed and new
> world file would be difficult to calculate.
>
> I have MapServer:
>
> MapServer version 3.5 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
> SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER INPUT=EPPL7 INPUT=OGR
> INPUT=GDAL INPUT=SHAPEFILE
Miro,
Don't you just need to use hte OFFSITE parameter in your LAYER description?
For example, the following would indicate that any pixel with the value 0
should be treated as NODATA. The GDAL support in MapServer honours this,
at least for colormapped images.
OFFSITE 0
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