mapfish / mapfish-print

A component of MapFish for printing templated cartographic maps. This module is the Java serverside module.
http://mapfish.github.io/mapfish-print-doc/
BSD 2-Clause "Simplified" License
185 stars 416 forks source link

Mapfish print should support Standrd format #256

Closed sbrunner closed 9 years ago

sbrunner commented 9 years ago

Actually the WMTS KVP don't support image/jpeg

This: https://github.com/mapfish/mapfish-print/blob/b29dcc21afb709a7bcb3abc52e9c715f4c12b350/core/src/main/java/org/mapfish/print/map/tiled/AbstractTiledLayerParams.java#L43-L49 Looks like that there is a complete mixage between image format and image extension.

_We need that for 18 june !!!!!_

jesseeichar commented 9 years ago

In order for simplicity the docs say that only the extension (or the part after image/) is used but we can if desired allow both.

Question is why do we need to support both?

I agree that if all the different plugins should be consistent with regards to the input attributes. If a particular plugin (like WMTS KVP) requires a mimetype then it should not be hard to convert the type into something the particular plugin understands.

sbrunner commented 9 years ago

For me we should support only the full format, to have the half format we should parse it on the client to have jpeg from image/jpeg and on the server to have image/jpeg from jpeg for me it's ridiculous to have double conversion ! and the day where we will have verctor tiles the type can be something like application/json and than we will have an other description for the same argument name ...

And it's also make confusing because behind we have the OGS standard where we use the full format.

And finally actually it don't works with OSM layers ! the mime type of the layers is image/jpeg that if should be jpeg but it's used as an extension who can be jpg :-(

sbrunner commented 9 years ago

And also the description id wrong tif is not a half part of the mimetype !

sbrunner commented 9 years ago

For me we should completely separate the booth notions imageExtention and imageFormat that use a full mimetype.

sbrunner commented 9 years ago

I'm going to implement this solution !

tsauerwein commented 9 years ago

What is the advantage of having both imageExtension and imageFormat? Are both used/needed? Would the user have to give both?

sbrunner commented 9 years ago

Two different thing => too different thing !

sbrunner commented 9 years ago

Would the user have to give both?

non only witch required ! OGC services => format, OSM => extension

tsauerwein commented 9 years ago

non only witch required ! OGC services => format, OSM => extension

What about WMTS REST where you generate a URL like .../default/20140520/3857/9/266/180.jpg?

Will this change break backward compatibility?

sbrunner commented 9 years ago

no

jesseeichar commented 9 years ago

Well originally it was going to just be the image format but I suppose we can deprecate the old use of "imageFormat": "jpeg" and recommend "imageFormat": "image/jpeg".

Just make sure that the old format is still supported for most of the 3.x lifecycle. But you can remove the references to plain jpeg in the documentation

Go ahead and make a PR @sbrunner