sourcepole / qgis-wps-client

GNU General Public License v2.0
13 stars 12 forks source link

Can't add a synonym of a format #7

Open KolesovDmitry opened 7 years ago

KolesovDmitry commented 7 years ago

General description

Some data formats have synonyms, for example "text/xml" mime type has "application/gml+xml" official synonym.

But if a user add new synonym to format list, the resulting code has side effects. For example

  1. Add the next code to the line https://github.com/sourcepole/qgis-wps-client/blob/master/wpslib/processdescription.py#L126:
    {"MIMETYPE":"application/gml+xml", "SCHEMA": "GML", "GDALID": "GML", "DATATYPE": "GML","EXTENSION": "gml"},
    1. Run the plugin, use WPS server with "application/gml+xml" input.
    2. The plugin can handle "text/xml" mime type or "application/gml+xml", but not both: for one or another case the plugin raises "The process '<...>' does not seem to support GML for the parameter '<...>', which is required by the QGIS WPS client." error. (Details depend on order of mime types in VECTOR_MIMETYPES list).

Cause of the issue

The cause is connected with getBaseMimeType and getDataTypeInfo functions (both functions are called in the line):

hdus commented 7 years ago

Do you have an idea how to solve the issue?