[Geomoose-users] Unsupported output format (image/png;bits=8)

James Klassen klassen.js at gmail.com
Tue Aug 13 13:34:57 PDT 2013


I think you are right about that being a typo geomoose_globals.map. 
However, I further that sentiment by reiterate my comment from line 9 of
the same file.  Does this stuff even need to be set in MS 6.x?  JSK

The block around line 23 will make MapServer w/AGG output a 8 bit PNG. 
However, looking at the MapServer code, it does look like this is all
built in now, so no need to specify it in our file.

My recommendation... remove all mention of OUTPUTFORMATs from
geomoose_globals.map.

For the interested the formats built into MapServer are listed in
mapoutput.c:
struct defaultOutputFormatEntry defaultoutputformats[] = {
  {"png","AGG/PNG","image/png"},
  {"jpeg","AGG/JPEG","image/jpeg"},
#ifdef USE_GD
  {"gif","GD/GIF","image/gif"},
#endif
  {"png8","AGG/PNG8","image/png; mode=8bit"},
  {"png24","AGG/PNG","image/png; mode=24bit"},
#ifdef USE_CAIRO
  {"pdf","CAIRO/PDF","application/x-pdf"},
  {"svg","CAIRO/SVG","image/svg+xml"},
  {"cairopng","CAIRO/PNG","image/png"},
#endif
#ifdef USE_GDAL
  {"GTiff","GDAL/GTiff","image/tiff"},
#endif
#ifdef USE_KML
  {"kml","KML","application/vnd.google-earth.kml+xml"},
  {"kmz","KMZ","application/vnd.google-earth.kmz"},
#endif
  {NULL,NULL,NULL}
};


On 2013/8/13 11:05 AM, Brent Fraser wrote:
> Well, I'm confused.  AFAIK, "FORMAT" is not a valid standard mapserver
> CGI parameter, and looking at the demo parcels.map file, we're not
> doing mapserver run-time substitution.  The mapbook entry might be a
> cut-and-paste error from a  WMS entry (is FORMAT valid for WMS?). 
> Maybe Geomoose is changing FORMAT to some other keyword?
>
> Ah, never mind the above.  I forgot Geomoose 2.6 does not use
> mapserver CGI protocol; it uses WMS protocol to communicate with
> mapserver...
>
> At any rate, I think there is a bug in our geomoose_globals.map on
> line 23:
> MIMETYPE "image/png;bits=8"
>
> should be:
>
> MIMETYPE "image/png; mode=8bit"
>
> Not that it really matters, I don't think mapserver will output an 8
> bit png, but I'd have to do some testing to confirm that.
> Best Regards,
> Brent Fraser
> On 8/13/2013 8:19 AM, Eli Adam wrote:
>>
>> On Wed, Aug 7, 2013 at 7:40 AM, Robert R. Raiz <raizrobert at gmail.com
>> <mailto:raizrobert at gmail.com>> wrote:
>>
>> > I managed to find out the cause of this error. If the param value
>> is declared, it will not take consideration of any other OUTPUTFORMAT
>> other than the one with MIMETYPE "image/png;bits=8"
>> > example of param:
>> > <map-source name="parcels" type="mapserver">
>> >                 <file>./demo/parcels/parcels.map</file>
>> >                 <layer name="parcels" status="on"/>
>> >                 <param name="FORMAT" value="image/png;bits=8"/>
>> >  </map-source>
>>
>> Tricky. 
>>
>> I see that you got that from the demo example,
>> http://trac.osgeo.org/geomoose/browser/geomoose2/branches/geomoose-2.6/conf/mapbook.xml#L102 
>> I'm wondering if the documentation should be updated in
>> http://www.geomoose.org/docs/mapbook.html#map-source or in the adding
>> a layer section or the geomoose_globals.map section of
>> http://www.geomoose.org/howto/layer.html
>>
>> Is there a reason to include the FORMAT parameter in the mapbook? 
>>
>> Thoughts?
>>
>> Eli
>>  
>> >
>> >
>> > If I remove that param, GeoMoose displays any other OUTPUTFORMAT
>> from my map template. I did not notice it before as I have a script
>> that brings in the mapbook all the layers, params and so on from my
>> mapfile.
>> >
>> > I will come back shortly with my findings on this post as
>> well: http://lists.osgeo.org/pipermail/geomoose-users/2013-July/005108.html
>> >
>> >
>> > On Wed, Jul 24, 2013 at 5:02 PM, Robert R. Raiz
>> <raizrobert at gmail.com <mailto:raizrobert at gmail.com>> wrote:
>> >>
>> >> Thank you Brent,
>> >>
>> >> Unfortunately, I still get that error even with your settings.
>> >> I am using 6.2.1. It appears like it is hardcoded somewhere,
>> dunno. The mapfile is quite straightforward, no complicated stuff.
>> The only version which works (but does not display png icons well) is
>> the one from the first emails. Did not see this type of errors
>> before. Strange.
>> >>
>> >>
>> >> On Wed, Jul 24, 2013 at 4:53 PM, Brent Fraser
>> <bfraser at geoanalytic.com <mailto:bfraser at geoanalytic.com>> wrote:
>> >>>
>> >>> Here's the definition I appear to be using:
>> >>>
>> >>>     IMAGETYPE AGG_PNG
>> >>>     OUTPUTFORMAT
>> >>>         NAME  'AGG_PNG'
>> >>>         DRIVER AGG/PNG
>> >>> #        MIMETYPE "image/png;mode=24bit"
>> >>>         MIMETYPE "image/png"
>> >>>         IMAGEMODE RGBA    # renders IMAGECOLOR transparent
>> >>>         EXTENSION "png"
>> >>>         FORMATOPTION "INTERLACE=false"
>> >>>         FORMATOPTION "TRANSPARENT=ON"
>> >>>         TRANSPARENT ON
>> >>>         FORMATOPTION "QUANTIZE_FORCE=ON"
>> >>>         FORMATOPTION "QUANTIZE_DITHER=off"
>> >>>         FORMATOPTION "QUANTIZE_COLORS=256"
>> >>>     END
>> >>>
>> >>> Which version of Mapserver are you using?
>> >>>
>> >>> Best Regards,
>> >>> Brent Fraser
>> >>>
>> >>> On 7/24/2013 7:37 AM, Robert R. Raiz wrote:
>> >>>>
>> >>>> I just tried it out. Both:
>> >>>>
>> >>>> WEB
>> >>>> METADATA
>> >>>> 'ows_title' 'Parcel Maps'
>> >>>> 'ows_srs' 'EPSG:26915 EPSG:4326 EPSG:900913 EPSG:4269 EPSG:2277'
>> >>>> 'ows_enable_request' '*'
>> >>>> 'ows_onlineresource' 'http://www.geomoose.org'
>> >>>> END
>> >>>> END
>> >>>>
>> >>>> OUTPUTFORMAT
>> >>>>  NAME "png8"
>> >>>>  DRIVER AGG/PNG8
>> >>>>  MIMETYPE "image/png; mode=8bit"
>> >>>>  IMAGEMODE RGB
>> >>>>  EXTENSION "png"
>> >>>> END
>> >>>>
>> >>>> And:
>> >>>>
>> >>>>         OUTPUTFORMAT
>> >>>>  NAME "png32"
>> >>>>  DRIVER AGG/PNG
>> >>>>  MIMETYPE "image/png; mode=32bit"
>> >>>>  IMAGEMODE RGBA
>> >>>>  EXTENSION "png"
>> >>>> END
>> >>>>
>> >>>> Both return the same error. I think the syntax is quite ok, I do
>> not see what could be wrong as there are a few simple lines.
>> >>>> If I put DRIVER AGG/PNG32 is returns another
>> error: loadOutputFormat(): General error message. OUTPUTFORMAT clause
>> references driver AGG/PNG32, but this driver isn't configured.
>> >>>>
>> >>>>
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> Raiz Roland Robert
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Raiz Roland Robert
>> >
>> >
>> >
>> > _______________________________________________
>> > Geomoose-users mailing list
>> > Geomoose-users at lists.osgeo.org <mailto:Geomoose-users at lists.osgeo.org>
>> > http://lists.osgeo.org/mailman/listinfo/geomoose-users
>> >
>>
>
>
>
> _______________________________________________
> Geomoose-users mailing list
> Geomoose-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geomoose-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20130813/d3114220/attachment.html>


More information about the Geomoose-users mailing list