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

Tim Sutton tim at kartoza.com
Tue Dec 27 13:36:15 PST 2016


Hi

> On 27 Dec 2016, at 10:24 PM, Matthias Kuhn <matthias at opengis.ch> wrote:
> 
> 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?

Yes! :-) Thats pretty much what I intended with my contrived term 'layer annotation'. Using the .qml could also work - I was thinking when writing the above to try to separate the style from other layer properties in the layer but since the .qml is already overloaded with other things maybe having a better separation of concerns is a task for QGIS version 4 :-) I guess based on your notes above having things like counters stored in the annotation file might be a reason to indeed use a separate file  since .qml files might be version controlled or read only for a user etc.

Regards

Tim


> 
> Regards
> Matthias
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

—










Tim Sutton

Co-founder: Kartoza
Project chair: QGIS.org

Visit http://kartoza.com <http://kartoza.com/> to find out about open source:

Desktop GIS programming services
Geospatial web development
GIS Training
Consulting Services

Skype: timlinux 
IRC: timlinux on #qgis at freenode.net

Kartoza is a merger between Linfiniti and Afrispatial

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20161227/31d78f7a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: KartozaNewLogoThumbnail.jpg
Type: image/jpeg
Size: 6122 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20161227/31d78f7a/attachment-0001.jpg>


More information about the Qgis-developer mailing list