Hi Jukka,

Thanks for your clear, in depth explanation.
Your "OVERSAMPLE_RATIO=1.0" workaround works just fine. And it makes sense
to me.

Philippe

On Fri, Feb 27, 2026 at 3:27 PM Rahkonen Jukka <
[email protected]> wrote:

> Hi,
>
> Thank you for the test package. I think I know what happens and I have a
> fix or a workaround for you.
>
> I added some more debugging first, not sure if all these were really
> needed.
>
> CONFIG MS_ERRORFILE "c:\ms4w_data\test2\errorfile.txt"
> CONFIG "CPL_DEBUG" "ON"
> CONFIG "PROJ_DEBUG" "ON"
>
> The MS_ERRORFILE shows what is the difference.
>
>
> WMS 1.1.0 is using method "msDrawRasterLayerGDAL()"
>
> msDrawRasterLayerGDAL(): Entering transform.
> msDrawRasterLayerGDAL(): src=0,0,4096,2048, dst=0,10,994,498
>
> WMS 1.3.0 probably believes that is must do warping and it selects to use
> method "msDrawGDAL(Image_Layer)"
>
> msResampleGDALToMap in effect: cellsize = 0.181087
> msDrawGDAL(Image_Layer): using RAW_WINDOW=0 0 4096 2048, dst=0,0,1988,994
>
> I do not understand the details, but in WMS 1.3.0 case the values in "dst"
> (destination) are about doubled.
>
> The Apache error log shows that depending on the WMS version, GDAL selects
> different overview levels from the GeoPackage, either "overview 1024 x 512"
> or "overview 2048 x 1024"
>
> Maybe the best fix for this case would be to make Mapserver consider that
> EPSG:4326 and CRS:84 are the same and no warping is needed between those
> two. And therefore there is no need to select the other code path.
>
> As a workaround, see https://mapserver.org/input/raster.html and add this
> line into your LAYER:
> PROCESSING "OVERSAMPLE_RATIO=1.0"
> Oversampling means that higher resolution data than what is needed for the
> output is read in for warping. That improves the quality of the warped
> result. That is fine for orthophotos and scanned maps, but in your use case
> the better resolution overview contains also different data from another
> zoom level.
>
> I tried also "PROCESSING ALLOW_OVERSAMPLE=NO" but for some reason it did
> not work for me. I was testing with a bit old MapServer version 8.3.0-dev
> (MS4W 5.0.0).
>
> -Jukka Rahkonen-
>
>
The information in this e-mail is confidential. The contents may not be 
disclosed or used by anyone other than the addressee. Access to this e-mail by 
anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and 
delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of 
this e-mail as it has been sent over public networks. If you have any concerns 
over the content of this message or its Accuracy or Integrity, please contact 
Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus 
scanning software but you should take whatever measures you deem to be 
appropriate to ensure that this message and any attachments are virus free.
_______________________________________________
MapServer-users mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to