Hi, I would like to discuss possible change of providers URI format. Motivation: - Each provider is using a different way to store additional parameters in URI - Some providers (WMS) even don't store all parameters in URI and require extra methods to add a new layer: addRasterLayer( rasterLayerPath, baseName, providerKey, layers, styles, format, crs ) - provider key is not part of URI, so the current URI is not sufficient to be used as QMimeData for drag and drop of layers to legend.
Current URI formats: OGR: data_source|layer_name GDAL: file_path PostGIS, SQLAnywhere, SQLite : space separated list of key=value pairs, using QgsDataSourceURI WMS: service URL + set of params which are not in URI GRASS raster: file path to cellhd GRASS vector: path_to_vector/layernumber_layertype GPX: file_path?type=type Delimited text, Memory: URL - using QUrl Some possible solutions: 1) minimal: - add WMS additional params somehow to URI + parsing in WMS provider (it is not clear to me why it was not done this way when WMS was implemented) - encode / decode provider key + uri as single string only for drag and drop 2) maximal A: - use QUrl for all providers with providers key as scheme 3) maximal B: - use modified QgsDataSourceURI (it is not generic, works with set of known params only) for all params including provider key Other issues: - should it be possible to pass via URI also layer style hints? - how the QGIS should recognize layer type of a dropped URI? Should it be a param in URI or the QGIS should recognize that from a provider key (asking provider)? - what mime type should be used for QGIS URIs? Radim _______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
