[mapserver-dev] WMS exception for requests width height=1

Lime, Steve D (MNIT) Steve.Lime at state.mn.us
Wed Apr 10 13:31:04 PDT 2013


I agree the more I think about it... I added an alternative to the pull request.

-----Original Message-----
From: mapserver-dev-bounces at lists.osgeo.org [mailto:mapserver-dev-bounces at lists.osgeo.org] On Behalf Of Daniel Morissette
Sent: Wednesday, April 10, 2013 3:10 PM
To: mapserver-dev at lists.osgeo.org
Subject: Re: [mapserver-dev] WMS exception for requests width height=1

It doesn't seem right to me at first sight, but I don't have time to dig further now. Using w=1.5 in this case means 0.25 pixels from the border, not 0.5, no?


On 13-04-10 4:07 PM, Lime, Steve D (MNIT) wrote:
> Patch seems reasonable IMHO... --Steve
>
> *From:*mapserver-dev-bounces at lists.osgeo.org
> [mailto:mapserver-dev-bounces at lists.osgeo.org] *On Behalf Of *Martin 
> Kofahl
> *Sent:* Wednesday, April 10, 2013 3:04 PM
> *To:* Worth Lutz
> *Cc:* MapServer Dev Mailing List
> *Subject:* Re: [mapserver-dev] WMS exception for requests width 
> height=1
>
> In that case the, MapServer should calculate with the distance from 
> the size from the center of a single pixel to border, I think. So 0.5.
> Changes in https://github.com/mapserver/mapserver/pull/4629
>
> 2013/4/10 Worth Lutz <wal3 at mindspring.com 
> <mailto:wal3 at mindspring.com>>
>
> If I understand correctly, it is because MapServer is based upon a 
> cell size of center of pixel to center of pixel.
>
> With 1 pixel you have nothing. With 2 pixels you have 1 cell.
>
> Worth Lutz
>
> ----------------------------------------------------------------------
> --
>
> *From:*mapserver-dev-bounces at lists.osgeo.org
> <mailto:mapserver-dev-bounces at lists.osgeo.org>
> [mailto:mapserver-dev-bounces at lists.osgeo.org
> <mailto:mapserver-dev-bounces at lists.osgeo.org>] *On Behalf Of *Martin 
> Kofahl
> *Sent:* Wednesday, April 10, 2013 2:40 PM
> *To:* MapServer Dev Mailing List
> *Subject:* [mapserver-dev] WMS exception for requests width height=1
>
> Hello,
>
> currently, I see wms clients (qgis, arcgis 10) doing getmap requests 
> with height=1. MapServer (6.2) throws an exception:
>
> msDrawMap(): Image handling error. Unable to initialize image.
>
> msCalculateScale(): General error message. Invalid image extent, 
> minx=nan, miny=nan, maxx=nan, maxy=nan.
>
> The reason is in msAdjustExtent(), where the cell size is calculated 
> using MS_CELLSIZE(miny,maxy,height), defined as ((max - min)/(d-1)).
> Formally, I don't see any reasons against 1 pixel requests. What are 
> the reasons for "d-1"?
>
> Martin
>
> ----------------------------------------------------------------------
> --
>
> No virus found in this message.
> Checked by AVG - www.avg.com <http://www.avg.com>
> Version: 2013.0.3272 / Virus Database: 3162/6236 - Release Date: 
> 04/10/13
>
>
>
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>


--
Daniel Morissette
http://www.mapgears.com/
Provider of Professional MapServer Support since 2000

_______________________________________________
mapserver-dev mailing list
mapserver-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-dev




More information about the mapserver-dev mailing list