[Qgis-developer] Auto increment field for shapefiles?

kimaidou kimaidou at gmail.com
Sat May 17 05:56:11 PDT 2014


Hi Paolo

+1 for a QGIS Field edittype called "Serial" and implementing
auto-incrementation for non-database formats :

* in the form, make the field visible but not editable
* for new object, get the next number

QGIS could store the current serial state in the project file and update it
during the commit, and manage multiple inserts and errors on insert

Michael


2014-05-17 11:02 GMT+02:00 Paolo Cavallini <cavallini at faunalia.it>:

> Il 17/05/2014 00:38, mmekuria ha scritto:
> > I am not sure what you mean, Paulo. But there is already the Feature Id
> > (Object Id in ArcGIS) in QgsFeature. Do you mean having that a mandatory
> > field that gets populated every time a feature is created within a
> > shapefile?
>
> Almost: I mean let the user define a field as SERIAL
> http://www.postgresql.org/docs/9.3/static/datatype-numeric.html
> also for non-database data types (especially shp).
> It does not seem too difficult, now that we have a record number function
> in the
> expressions.
> All the best.
>
> --
> Paolo Cavallini - www.faunalia.eu
> Corsi QGIS e PostGIS: http://www.faunalia.eu/training.html
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20140517/1e2d14a4/attachment.html>


More information about the Qgis-developer mailing list