[Qgis-developer] $id not working as default value

Matthias Kuhn matthias at opengis.ch
Tue Dec 27 12:24:12 PST 2016


Hi Tim

On 12/27/2016 07:55 PM, Tim Sutton wrote:
> Hi
> 
> 
>> On 27 Dec 2016, at 9:40 AM, Neumann, Andreas <a.neumann at carto.net
>> <mailto:a.neumann at carto.net>> wrote:
>>
>> Hi Nyall,
>>
>> Thanks for clarifying.
>>
>> This needs to be properly documented and taught in QGIS courses.
>>
>>
> 
> I wonder if it is not worth floating the idea of layer annotations -
> something like GDAL does with it's aux.xml files that we can store stuff
> like this in. It is a shame to open a layer in one project where you
> have serial counters implemented, and then have to redo it in another
> project (and remember to do it). I know it would only work for file
> based (or maybe QGIS Layer Files too?) datasets but I recon that would
> cover most use cases since the 'proper' databases already have
> mechanisms to deal with this. Along with that we could have the layer
> creation dialog include a serial field type which would set up the
> constraints and annotate them in the layer annotation file.

this could be very handy. What I wonder is, if we save the current
counter, we will also need to save the constraints. And if we do that, I
wonder if this idea generalizes well to other layer properties like
field widget definitions and maybe even style. We will end up with
something similar to the shapefile concept, where there are a bunch of
additional files next to the data payload file.
This in turn looks basically like a .qml file which is loaded
automatically when found (based on filename). There could be some
options in the layer properties to explicitly control, what's going to
be saved in there and what not.
Does that make sense?

Regards
Matthias


More information about the Qgis-developer mailing list