<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style>
</head>
<body><div>Hi Pablo,<br></div>
<div><br></div>
<div>Just to note I also ran into this issue so you are not alone!<br></div>
<div>A WMS request from OpenLayers to MapServer would be fine, but modifying the size of the image (WIDTH and HEIGHT parameters) would result in a blank image and no errors in the logs. <br></div>
<div>I never got a chance to debug further though. An error should ideally be reported somewhere rather than a blank, seemingly valid, image. <br></div>
<div><br></div>
<div>Seth</div>
<div><br></div>
<div id="sig62266145"><div class="signature">--</div>
<div class="signature">web:http://geographika.co.uk</div>
<div class="signature">twitter: @geographika</div>
</div>
<div><br></div>
<div><br></div>
<div>On Wed, Jan 10, 2018, at 6:46 PM, Pablo Sanfilippo wrote:<br></div>
<blockquote type="cite"><div dir="ltr"><div>Hi all,<br></div>
<div><br></div>
<div>I admit this is the weirdest issue I have come across. This are the relevant parts of my MapServer configuration:<br></div>
<div><br></div>
<div><div><span class="font" style="font-family:monospace, " monospace""># A valid mapfile used for testing</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace"">MAP</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> NAME valid</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> STATUS ON</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> PROJECTION</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> "init=epsg:4326"</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> END</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""></span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> IMAGECOLOR 0 0 0</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> TRANSPARENT ON</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""></span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> WEB</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> METADATA</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> "wms_srs" "EPSG:4326 EPSG:3857"</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> END</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> END</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> </span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> LAYER</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> NAME "index"</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> STATUS ON</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> TYPE POLYGON</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> CONNECTIONTYPE POSTGIS</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> CONNECTION "host=x port=x dbname=x user=x password=x"</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> DATA "geometry from (select i.geometry, <a href="http://i.id">i.id</a>, '/vsis3/' || i.s3_bucket || '/' || i.s3_key as location from images_image) as index using unique id"</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> CLASS</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> STYLE</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> OUTLINECOLOR 0 0 0</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> WIDTH 1.0</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> COLOR 200 200 200</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> ANTIALIAS true</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> END</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> END</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> END</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""></span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> LAYER</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> NAME "images"</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> STATUS ON</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> TILEINDEX "index"</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> TILEITEM "location"</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> TYPE RASTER</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> PROJECTION</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> AUTO</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> END</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> METADATA</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> "wms_title" "Images"</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> END</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> END</span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""> </span><br></div>
<div><span class="font" style="font-family:monospace, " monospace""></span><br></div>
<div><span class="font" style="font-family:monospace, " monospace"">END</span><br></div>
</div>
<div><span class="font" style="font-family:monospace, " monospace""></span><br></div>
<div><span class="font" style="font-family:monospace, " monospace"">The data in the PostGIS index is in EPSG:4326. The images referenced by the index are GeoTIFFs georeferenced in EPSG:4326.</span><br></div>
<div><br></div>
<div>A WMS request for the index layer shows the index polygons fine, whatever the SRS and image size in the request.<br></div>
<div>A WMS request for the images layer using SRS=EPSG:4326 shows the images fine, whatever the image size.<br></div>
<div>A WMS request for the images layer using SRS=EPSG:3857 will work fine as long as the requested image size's x is greater than or equal to the y. If not, it will return a blank (transparent) image. For example, a 1300x1299 image will work fine, a 1300x1300 image won't work and 1301x1300 won't work either.<br></div>
<div><br></div>
<div>Any clues?<br></div>
<div><br></div>
<div>Thanks!<br></div>
</div>
<div><u>_______________________________________________</u><br></div>
<div>mapserver-users mailing list<br></div>
<div><a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br></div>
<div><a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br></div>
</blockquote><div><br></div>
</body>
</html>