Hi,
so doing the map preview I stumbled upon a few hiccups
of how the output formats are handled.
In particular, each output format has not one, but a
number of possible output formats names:
- GetMapProducer.getOutputFormatNames()
- WFSGetFeatureOutputFormat.getOutputFormats()
Capabilities documents build on top of this list directly,
but there are a few hiccups: some output formats list three
different synonyms for the same result, that is not good for
UI generation at all...
For example, we have GeoRSS list the following:
* application/rss+xml
* rss
* application/rss xml (yeah, without the +)
And GML ones list something like:
* gml3
* text/xml; subtype=gml/3.1.1
For the map preview I need just one. But there is also
the opposite, output formats that list more because
they can do more than one, this is the case of the
image output formats, where one class is usually
able to produce both the 24 and 8 bit outputs:
* "image/geotiff"
* "image/geotiff8"
(whilst the output mime type is just image/tiff since
there is no actual geotiff MIME)
So what I'd need is a list of valid output format
name, but without duplicates, if there are multiple
names I'm fine, but I need them to be doing different
things.
Afaik the output of getOutputFormats() is used for
matching the output format in the dispatcher, and
for that case the availability of synonims is good.
It seems we need a new call for a distilled list?
Or adding a boolean flag to the existing one?
Like:
getOutputFormat(synonims)
Opinions?
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.