[mapserver-users] MapServer returns a blank image when requesting a square image

Pablo Sanfilippo sanfilippopablo at gmail.com
Thu Jan 11 04:46:04 PST 2018


Oh, so this is a definitely a bug. Is it reported yet in the issue tracker?

On Wed, Jan 10, 2018 at 3:55 PM, Seth G <sethg at geographika.co.uk> wrote:

> Hi Pablo,
>
> Just to note I also ran into this issue so you are not alone!
> 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.
> I never got a chance to debug further though. An error should ideally be
> reported somewhere rather than a blank, seemingly valid, image.
>
> Seth
>
> --
> web:http://geographika.co.uk
> twitter: @geographika
>
>
> On Wed, Jan 10, 2018, at 6:46 PM, Pablo Sanfilippo wrote:
>
> Hi all,
>
> I admit this is the weirdest issue I have come across. This are the
> relevant parts of my MapServer configuration:
>
> # A valid mapfile used for testing
> MAP
>   NAME valid
>   STATUS ON
>   PROJECTION
>     "init=epsg:4326"
>   END
>
>   IMAGECOLOR 0 0 0
>   TRANSPARENT ON
>
>   WEB
>     METADATA
>       "wms_srs"             "EPSG:4326 EPSG:3857"
>   END
>   END
>
>   LAYER
>     NAME "index"
>     STATUS ON
>     TYPE POLYGON
>     CONNECTIONTYPE POSTGIS
>     CONNECTION "host=x port=x dbname=x user=x password=x"
>     DATA "geometry from (select i.geometry, i.id, '/vsis3/' ||
> i.s3_bucket || '/' || i.s3_key as location from images_image) as index
> using unique id"
>     CLASS
>       STYLE
>         OUTLINECOLOR 0 0 0
>         WIDTH 1.0
>         COLOR 200 200 200
>         ANTIALIAS true
>       END
>     END
>   END
>
>   LAYER
>     NAME "images"
>     STATUS ON
>     TILEINDEX "index"
>     TILEITEM "location"
>     TYPE RASTER
>     PROJECTION
>       AUTO
>     END
>     METADATA
>       "wms_title"           "Images"
>     END
>   END
>
>
> END
>
> The data in the PostGIS index is in EPSG:4326. The images referenced by
> the index are GeoTIFFs georeferenced in EPSG:4326.
>
> A WMS request for the index layer shows the index polygons fine, whatever
> the SRS and image size in the request.
> A WMS request for the images layer using SRS=EPSG:4326 shows the images
> fine, whatever the image size.
> 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.
>
> Any clues?
>
> Thanks!
> *_______________________________________________*
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20180111/ca344113/attachment.htm>


More information about the MapServer-users mailing list