[mapserver-users] Removing collars on raster images

Rahkonen Jukka Jukka.Rahkonen at mmmtike.fi
Fri Aug 14 04:27:28 PDT 2009


Hi,

I have not played with either lately. At least one difference is that gdal_merge.py can't warp images. Gdalwarp has also lots of more options.  Long time ago I used modified gdal_merge.py first for creating a virtual raster file (.VRT) which I used later as input file for gdalwarp. Now there seems to be a separate tool for this purpose, gdalbuildvrt. Is even seems to acceps Mapserver tileindex files as input. I guess that if you'll select to make rectangular images with no nodata areas then the work chain would include (gdaltindex) - gdalbuildvrt - gdalwarp.

-Jukka Rahkonen-

Espen Isaksen wrote

 
> Yes, that is a solution that will probably work. Do you know 
> the difference between gdal_merge.py and gdalwarp?
> 
> Espen
> 
> 
> 
> 2009/8/14 Rahkonen Jukka <Jukka.Rahkonen at mmmtike.fi>:
> > Hi,
> >
> > Not a very clever solution is to get rid of the collards 
> forever. However, it works for sure. Select a rectangular 
> grid in preferred output projection and mosaic and compress 
> the original images to suit that grid with gdalwarp by using 
> -te option. Then there will be no black borders to make 
> transparent any longer. It does not mean much extra work if 
> you have to compress the images in any case, but it does make 
> updating image layer a bit more complicated if you will 
> receice new images from scattered places every now and then.
> >
> > -Jukka Rahkonen-
> >
> >
> >> -----Alkuperäinen viesti-----
> >> Lähettäjä: mapserver-users-bounces at lists.osgeo.org
> >> [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Espen 
> >> Isaksen
> >> Lähetetty: 14. elokuuta 2009 12:00
> >> Vastaanottaja: mapserver-users at lists.osgeo.org
> >> Aihe: [mapserver-users] Removing collars on raster images
> >>
> >> Hi!
> >>
> >> This question has been asked in different ways before, but the 
> >> threads do not seem to give me the answers I need.
> >>
> >> We have lots of TB of images with black collars(borders). We would 
> >> like to try out using Mapserver for serving these images, 
> but we need 
> >> to have the black collars transparent.
> >> That is fine in Mapserver as long at you use regular Tiff.
> >> However, because of the many TB of data we need to 
> compress this data 
> >> and preferably tiff with jpeg compression.
> >>
> >> However, this compression creates edges between the collar and the 
> >> image where the image does not get transparent.
> >>
> >> I am struggling to find a solution to this problem. Is 
> ideas on how 
> >> we can avoid this problem? Is it for example possible to set a 
> >> transparency mask in the Tiff image which can be used by Mapserver?
> >> Another solution would be if Mapserver could support 
> setting an area 
> >> in an image transparent based on a polygon file.
> >>
> >> Any help is appreciated.
> >>
> >> Espen
> >> _______________________________________________
> >> mapserver-users mailing list
> >> mapserver-users at lists.osgeo.org
> >> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> >>
> >
> 



More information about the MapServer-users mailing list