[Mapserver-users] WMS server image black padding and aspect ratio

Eric Sokolowsky eric.sokolowsky at gsfc.nasa.gov
Wed Jan 28 13:48:36 PST 2004


On Wed, 28 Jan 2004, Ed McNierney wrote:

> Eric -
> 
> You may be slightly misunderstanding the WMS problem.  The WMS
> specification states that if an image request specifies an OUTPUT image
> size (WIDTH= and HEIGHT=) and a geographic bounding box (BBOX=) that are
> not consistent with one another (for example, WIDTH=200,HEIGHT=100 and
> BBOX=0,0,100,100, so a 100x100 area is being requested in a 200x100
> image) that the 100x100 geographic area be stretched in the X direction
> so it's 200 pixels wide.  MapServer does not do this, but instead
> renders a 200x100 geographic area to fill the box without stretching the
> OUTPUT image.

Yes, this is my understanding of the problem.  This is a show stopper for
me.  If I'm able to fix this problem, would others be interested in my
changes?


> Your comment makes it sound like you have INPUT images with different X
> and Y resolutions/scales.  This is completely unrelated to the problem
> with the WMS interface, and MapServer can handle those images with no
> problems - assuming of course that the metadata correctly describes the
> input images.

I see.  This is good.  Thanks for the response.



> -----Original Message-----
> From: Eric Sokolowsky [mailto:eric.sokolowsky at gsfc.nasa.gov] 
> Sent: Wednesday, January 28, 2004 2:29 PM
> To: Daniel Morissette
> Cc: mapserver-users at lists.gis.umn.edu
> Subject: Re: [Mapserver-users] WMS server image black padding and aspect
> ratio
> 
> On Fri, 23 Jan 2004, Daniel Morissette wrote:
> 
> > Eric Sokolowsky wrote:
> > > I am running mapserver 4.0.1 but this aspect also appears with the 
> > > version in CVS.  I am using mapserver as a WMS server on a Red Hat 
> > > Linux 9 system.  When I request an image that is not the same aspect
> 
> > > ratio as the original image on the server, it seems that the image I
> 
> > > get is not stretched so that it fills the entire frame.  The aspect 
> > > ratio of the original source is maintained and black bars either 
> > > appear above and below or else on both sides, similar to the effect 
> > > of watching widescreen movies on a regular TV.  Is this the intended
> 
> > > behavior, and if so, is there a way to turn it off?
> > > 
> > 
> > The short answer is that MapServer doesn't support rendering maps with
> 
> > different X and Y scales.  This is one of the only issues with 
> > MapServer before it passes all the OGC WMS tests.
> 
> This is most unfortunate.  It is absolutely critical for my application
> to allow this.  Most of the images that I want to serve have different X
> and Y scales, and it would be very difficult to rescale all of them.
> Also, even if I rescaled all of the images, it would not solve the
> problem of requesting a different aspect ratio bounding box.
> 
> Is there work being done to fix this problem?  I am willing to jump into
> the code to try and find a way to solve it, but I am not familiar with
> the code and it may take me a while to get up to speed with it.
> 
> > For the long story, see the following thread in the archives:
> > http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0401/msg00105
> > .html
> > 
> > Daniel
> > 
> 
> 

-- 
    ____   __     Eric Sokolowsky    (GST)  NASA Goddard Space Flight Center 
   / __/__/_/__  Visualization Programmer    Scientific Visualization Studio
  / __/ _/ / _/ 301.286.3751                  Mailstop 935.0 Bldg 28 Rm E102
 /___/_//_/__/ eric.sokolowsky at gsfc.nasa.gov   Greenbelt, MD 20771




More information about the MapServer-users mailing list