raster image preprocessing problem.

Zhonghai Wang zhonghaiw at GMAIL.COM
Tue Jun 6 05:28:57 PDT 2006


Hi Travis,

I think you are right, better I do the merging in RGB model, but it's
strange that I can not use the pct2rgb.py commnd, and the rgb2pct.py command
is no problem. Do you have any ideas why this happened?

zhonghai


On 6/6/06, Travis Kirstine GIS Tech <tkirstine at jdbarnes.com> wrote:
>
>  Zhonghai,
> My guess is that both the gdal_warp and gdal_merge utilities use the
> pusedo colour table of the first image and apply that table to all other
> images, I would try converting the gif to RGB geotiffs using the pct2rgb
> gdal utility then go through your processing steps(warping and merging) then
> convert the images back to 8bit GIFs.  I hope this helps
>
> Travis
>
> -----Original Message-----
> *From:* UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]*On
> Behalf Of *Zhonghai Wang
> *Sent:* Tuesday, June 06, 2006 6:35 AM
> *To:* MAPSERVER-USERS at LISTS.UMN.EDU
> *Subject:* [UMN_MAPSERVER-USERS] raster image preprocessing problem.
>
> Hi there,
>
> I have a couple of GIFs with wld files, but the original Projection is not
> the one I want, I tried to use the Proj4 to reproject them on-the-fly, but
> it takes really long to perform the map request, therefore I tried
> to preprocess the images with GDAL tools, but I've got some problems here:
>
> 1. problem with gdalwarp: trying to mosaic the images into one output
> file, but only the first image has the correct image color, the other images
> are rendered with strange colors, is this a common problem if using gdalwarp
> to mosaic images?
>
> 2.problem with gdal_merge.py: after trying the gdalwarp command, I've
> tried the gdal_merge.py command to merge all the images together with the
> -pct parameter, unfortunately, the merged image is the same as the first
> try. is it possible to merge images using the command with the correct color
> table?
>
> BTW: I can not use the gdal_translate command, since there are gaps
> between the reprojected images.
>
> thanks for your info.
>
> zhonghai
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060606/50f7c7f1/attachment.htm>


More information about the MapServer-users mailing list