This would be perfectly compatible with the difference on 1 pixel.

Thanks,

Peter

On 07/25/2014 12:32 AM, Lime, Steve D (MNIT) wrote:

There’s a difference between the extent models used by MapServer and OGC. The WMS code adjusts for that difference so the input extent will definitely see adjustment to account for that. OGC uses the UL corner of the UL pixel and the LR corner of the LR pixel. MapServer uses pixel centers consistently. Do your scale computations account for this difference?

Steve

*From:*[email protected] [mailto:[email protected]] *On Behalf Of *Peter Hopfgartner
*Sent:* Thursday, July 24, 2014 7:20 AM
*To:* [email protected]
*Subject:* Re: [mapserver-users] WMS Client changes slightly BBOX

Hi Worth,

thanks for your quick reply. Anyway, the ratio of the extent and of the image seem to match al least up to 10 digits. Playing with the numbers, the error is in the same order of magnitude as if I change image size by one pixel. I would guess, that there is a "off by 1" error somewhere in the MapServer code.

Regards,

Peter

On 07/24/2014 01:30 PM, Worth Lutz wrote:

    Peter,

    I have found that if the map size (width and height in pixels)
    aspect ratio does not exactly match the map extents (map units)
    aspect ratio the map extents are adjusted.

    I'm working with MapScript and to get exact scale pdf map I have
    to set map size first and then extent and then scale to get good
    results.

    I hope this helps.



    *Worth Lutz*
    ------------------

    On 07/24/2014 06:49 AM, Peter Hopfgartner wrote:

        I'm generating dynamically Map Object, with with a certain
        extent, in the concrete example
        629396.05065523,4984079.9894638,655192.92565523,5019084.3644638

        In generated Map object uses the WMS client functionality to
        call WMS services. Anyway, the BBOX get's slightly changed, so
        that the original scale of 1:100000 gets changed to approx
        1:100103, since it calls the WMS services with
        629382.807906257,4984062.02007212,655206.168404203,5019102.33385548

        as can be taken from the web server log files:

        mmm.mmm.mmm.mmm - - [24/Jul/2014:12:25:58 +0200] "GET
        
/author/services/ows.php?PROJECT=ancitel&MAP=catasto_reti&LANG=xw&OGSTAT=ot3cp0i7qmph4guuof75702m70&RESOLUTION=96&LAYERS=dtm,uso_lombardia,strade_lombardia,g_limiti_amministrativi,g_label,g_0707,g_0704&REQUEST=GetMap&SERVICE=WMS&FORMAT=image/png%3B+mode%3D8bit&STYLES=,,,,,,&HEIGHT=1323&VERSION=1.1.1&SRS=EPSG:32632&WIDTH=975&BBOX=629382.807906257,4984062.02007212,655206.168404203,5019102.33385548&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage
        HTTP/1.1" 200 678803 "-" "MapServer/6.4.1 libcurl/7.19.7"

        This change in scale is beyound te axpected tolerance in this
        particular use case, where technical data must be plotted in a
        PDF file.

        Any help is appreciated. Obvioulsly, I can fetch the WMS
        services in my code and overlay them "by hand". Anyway, for a
        couple of reasons this was the preferred approach.

        Regards,

        Peter




        _______________________________________________

        mapserver-users mailing list

        [email protected]  
<mailto:[email protected]>

        http://lists.osgeo.org/mailman/listinfo/mapserver-users





    _______________________________________________

    mapserver-users mailing list

    [email protected]  <mailto:[email protected]>

    http://lists.osgeo.org/mailman/listinfo/mapserver-users


--
Peter Hopfgartner
R3 GIS Srl - GmbH
web  : http://www.r3-gis.com

_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to