[Qgis-developer] URI

Radim Blazek radim.blazek at gmail.com
Wed Jun 8 16:21:00 EDT 2011


On Wed, Jun 8, 2011 at 2:10 PM, Marco Hugentobler
<marco.hugentobler at sourcepole.ch> wrote:
> Hi Radim
>
>> I would suggest a QgsDataSourceURI with two types of params. One type
>> whould be set/recognized by a provider to set/get provider specific
>> data source URI params, for example setParam(key, val) and
>> getParam(key). All parts of URI would be stored as params so that for
>> example host name of WMS URI would be stored as "host" param not as a
>> special part of URI.
>>
>> The second type of params would be known to QGIS but not to provider.
>> Methods like setStandardParam() / getStandardParam() would set / get
>> some standard parameters, for example setStandardParam("provider",
>> "WMS") would set provider key, which would be encoded in URI string as
>> "_provider=wms" (with underscore to distinguish standard params).
>> Layer type could also be a standard param if we find it necessary to
>> be a part of URI.
>
> This sounds reasonable to me.
>
>>Style hint or similar parameters could be add as
>>standard params to URI in future.
>
> What do you mean with 'style hint' in that context? A feature style that comes
> from the provider (e.g. kml, dxf)?

It was just vague idea, I don't know yet how to use it exactly, CAD
symbology is one possibility. I was thinking more about drag-and-drop
of layers. Is there any plan how to encode layer info (including
style) for dragging between two QGIS instances? Does it make sense?

Another question, how to store parameters encoded in URI in project
file? Should everything be stored in one URI tag or separated into
attributes or tags?

Radim
Radim


More information about the Qgis-developer mailing list