[mapserver-users] Transparent lines at -180 when rendering BlueMarble data

Lime, Steve D (DNR) Steve.Lime at state.mn.us
Wed Dec 30 23:40:15 EST 2009


I wonder if it's due to differences in the extent models. GDAL uses edge-to-edge (I believe) meaning that the extent represents the outer edge of the UL and LR pixels in the image. MapServer uses a center-to-center model where the extent represents the pixel centers of the UL and LR pixels. The software itself takes these differences into account and you might need to as well as you compute extents. So, when you set an extent with minx at -180, MapServer has the center of it's left-hand edge pixels at -180, but in GDAL that's the left-hand edge of the left-hand edge pixels. Rounding error could account for the blank column.

I'd convert your GDAL extent to a MapServer extent (I can help with this if necessary) and then chop things up based on that. Make sense?

Steve

________________________________________
From: mapserver-users-bounces at lists.osgeo.org [mapserver-users-bounces at lists.osgeo.org] On Behalf Of Jason Beverage [jasonbeverage at gmail.com]
Sent: Monday, December 28, 2009 1:27 PM
To: mapserver-users
Subject: [mapserver-users] Transparent lines at -180 when rendering     BlueMarble data

Hi all,

I'm using mapscript to render some blue marble data into tiles.  The issue I'm seeing is that occasionally I get a 1pixel wide transparent column along -180 at different zoom levels.  For example, if I render a 256x256 tile by setting the map's extent using:
map.setExtent (-180.0, -22.5, -157.5, 0.0)

I'm getting the attached image with the transparent column.

The extent of the file itself via gdalinfo is -180,-90,180,90 so it does cover the whole world and there are no transparent pixels in the data itself.

Thanks!

Jason


More information about the mapserver-users mailing list