[mapserver-users] OUTPUTFORMAT png 16-bits

Johannes Paul johannespaul92 at gmail.com
Wed Feb 5 08:35:29 PST 2020


Thanks for the trick Jeff, unfortunatelly i still get a 8-bits png and
obviously uint16 is not a valid mapserver imagemode...
Johannes

Le mer. 5 févr. 2020 à 16:52, Jeff McKenna <jmckenna at gatewaygeomatics.com>
a écrit :

> Hi Johannes,
>
> I just wanted to mention that what I always test OUTPUTFORMAT with is
> through the shp2img commandline utility, with the "-i" switch, such as:
>
>    shp2img -m test.map -o ttt.png -i PNG16 -all_debug 5
>
> PS. in the future MapServer v8.0 I hope to help change that utility name
> to "map2img", so it makes more sense.
>
>
> -jeff
>
>
>
> --
> Jeff McKenna
> MapServer Consulting and Training Services
> https://gatewaygeomatics.com/
>
>
>
>
> On 2020-02-05 6:02 a.m., Johannes Paul wrote:
> > Hello,
> > I'm using Mapserver to output PNG 16-bits DEM raster from .HGT elevation
> > data.
> > I'm using the below output format definition :
> >
> > |OUTPUTFORMAT NAME PNG16 DRIVER GDAL/PNG MIMETYPE image/png IMAGEMODE
> > INT16 EXTENSION "png" END|
> >
> > However I keep on getting the standard PNG 8-bits out of mapserver.
> >
> > The strange thing being that when I use a similar config to get GeoTiff
> > 16-bits, I do get what I'm asking for :
> >
> > OUTPUTFORMAT
> >    NAME GEOTIFF16
> >    DRIVER GDAL/GTiff
> >    MIMETYPE image/tiff
> >    IMAGEMODE INT16
> >    EXTENSION "tiff"
> > END
> >
> >
> > Could that be an issue with the GDAL/PNG driver ? It seems that the
> > GDAL/PNG driver supports only CreateCopy() and not Create(), where the
> > GDAL/GTiff driver supports both ... Could that be it ? I suspect the
> > GDAL/PNG driver so I also sent my issue to the GDAL mailing list.
> >
> > I can see from the mailing list that other users already had a similar
> > issue, but there is no obvious reason or solution provided.
> > https://lists.osgeo.org/pipermail/mapserver-users/2011-April/068428.html
> >
> https://lists.osgeo.org/pipermail/mapserver-users/2012-January/071310.html
> >
> > For information, I'm using GDAL v2.1.3 and Mapserver v7.0.1
> > Thanks,
> > Johannes
> >
> >
>
>
> _______________________________________________
> 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/20200205/72bd2cfc/attachment.html>


More information about the mapserver-users mailing list