Re: [Qgis-user] Auto-fill id in attribute table when creating a feature
Just ignore the ID field, It's created just for the reason you already mentioned, the fact that the shapefile needs at least one field. You can leave it blank and/or add any other columns that you need. QGIS will save an internal ID anyway, you can access to is usin the $id function in the filed calculator, or using the identifier tool in the feature. Alexandre Neto Karl-Magnus Jönsson escreveu no dia terça, 31/05/2016 às 14:41: > OK. Maybe not. But are you not interested in adding attribute values to > the features you can set that the attribute form doesn’t show after adding > features. Look in the top of section digitizing in the options dialog. > > > > > http://docs.qgis.org/2.8/en/docs/user_manual/introduction/qgis_configuration.html#options > > > > > > *Karl-Magnus Jönsson* > > > > *Från:* Simon Muirhead [mailto:si...@simsurf.com.au] > *Skickat:* den 31 maj 2016 15:27 > *Till:* Karl-Magnus Jönsson > *Ämne:* Re: SV: [Qgis-user] Auto-fill id in attribute table when creating > a feature > > > > Hi Karl, it won't let you create a shape file without at least one field > in the attribute table. > > Regards, Simon Muirhead > Written from my Nexus 6P so don't expect Tolstoy. > > On 31 May 2016 23:19, "Karl-Magnus Jönsson" < > karl-magnus.jons...@kristianstad.se> wrote: > > Hi! > > Do you really need the ID field in the shapefile? If not you can drop it, > hide it or ignore it and it works anyway. If you need a counter as primary > key consider using another data provider suggested by Andreas. > > > > *Karl-Magnus Jönsson* > > > > *Från:* Qgis-user [mailto:qgis-user-boun...@lists.osgeo.org] *För *Neumann, > Andreas > *Skickat:* den 31 maj 2016 14:04 > *Till:* Simon Muirhead > *Kopia:* qgis-user@lists.osgeo.org > *Ämne:* Re: [Qgis-user] Auto-fill id in attribute table when creating a > feature > > > > Hi Simon, > > It is a bit data provider dependent. For many data providers (e.g. > Postgis, SpatiaLite, Geopackage) you just don't fill in this value (or > better set the edit widget to "read only") - provided that the database has > a sequence defined for the primary key column. The values are filled in > when saving the data. In 2.16 there is a new mode for PostgreSQL to > immediately get the id value (experimental). > > What data format are you using? > > Greetings, > > Andreas > > On 2016-05-31 13:43, Simon Muirhead wrote: > > Hi, I am new to QGIS, coming from ARCGiS. I was wondering when creating a > new feature in a shape file, QGIS asks to fill in the id in the attribute > table for every feature created. Is there anyway to have this done > automatically like ARCGiS does? > > Regards, Simon Muirhead > Written from my Nexus 6P so don't expect Tolstoy. > > > > ___ > Qgis-user mailing list > Qgis-user@lists.osgeo.org > List info: http://lists.osgeo.org/mailman/listinfo/qgis-user > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user > > > > > ___ > Qgis-user mailing list > Qgis-user@lists.osgeo.org > List info: http://lists.osgeo.org/mailman/listinfo/qgis-user > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user -- Alexandre Neto - @AlexNetoGeo http://sigsemgrilhetas.wordpress.com http://gisunchained.wordpress.com ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Auto-fill id in attribute table when creating a feature
OK. Maybe not. But are you not interested in adding attribute values to the features you can set that the attribute form doesn’t show after adding features. Look in the top of section digitizing in the options dialog. http://docs.qgis.org/2.8/en/docs/user_manual/introduction/qgis_configuration.html#options Karl-Magnus Jönsson Från: Simon Muirhead [mailto:si...@simsurf.com.au] Skickat: den 31 maj 2016 15:27 Till: Karl-Magnus Jönsson Ämne: Re: SV: [Qgis-user] Auto-fill id in attribute table when creating a feature Hi Karl, it won't let you create a shape file without at least one field in the attribute table. Regards, Simon Muirhead Written from my Nexus 6P so don't expect Tolstoy. On 31 May 2016 23:19, "Karl-Magnus Jönsson" mailto:karl-magnus.jons...@kristianstad.se>> wrote: Hi! Do you really need the ID field in the shapefile? If not you can drop it, hide it or ignore it and it works anyway. If you need a counter as primary key consider using another data provider suggested by Andreas. Karl-Magnus Jönsson Från: Qgis-user [mailto:qgis-user-boun...@lists.osgeo.org<mailto:qgis-user-boun...@lists.osgeo.org>] För Neumann, Andreas Skickat: den 31 maj 2016 14:04 Till: Simon Muirhead Kopia: qgis-user@lists.osgeo.org<mailto:qgis-user@lists.osgeo.org> Ämne: Re: [Qgis-user] Auto-fill id in attribute table when creating a feature Hi Simon, It is a bit data provider dependent. For many data providers (e.g. Postgis, SpatiaLite, Geopackage) you just don't fill in this value (or better set the edit widget to "read only") - provided that the database has a sequence defined for the primary key column. The values are filled in when saving the data. In 2.16 there is a new mode for PostgreSQL to immediately get the id value (experimental). What data format are you using? Greetings, Andreas On 2016-05-31 13:43, Simon Muirhead wrote: Hi, I am new to QGIS, coming from ARCGiS. I was wondering when creating a new feature in a shape file, QGIS asks to fill in the id in the attribute table for every feature created. Is there anyway to have this done automatically like ARCGiS does? Regards, Simon Muirhead Written from my Nexus 6P so don't expect Tolstoy. ___ Qgis-user mailing list Qgis-user@lists.osgeo.org<mailto:Qgis-user@lists.osgeo.org> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Auto-fill id in attribute table when creating a feature
Hi! Do you really need the ID field in the shapefile? If not you can drop it, hide it or ignore it and it works anyway. If you need a counter as primary key consider using another data provider suggested by Andreas. Karl-Magnus Jönsson Från: Qgis-user [mailto:qgis-user-boun...@lists.osgeo.org] För Neumann, Andreas Skickat: den 31 maj 2016 14:04 Till: Simon Muirhead Kopia: qgis-user@lists.osgeo.org Ämne: Re: [Qgis-user] Auto-fill id in attribute table when creating a feature Hi Simon, It is a bit data provider dependent. For many data providers (e.g. Postgis, SpatiaLite, Geopackage) you just don't fill in this value (or better set the edit widget to "read only") - provided that the database has a sequence defined for the primary key column. The values are filled in when saving the data. In 2.16 there is a new mode for PostgreSQL to immediately get the id value (experimental). What data format are you using? Greetings, Andreas On 2016-05-31 13:43, Simon Muirhead wrote: Hi, I am new to QGIS, coming from ARCGiS. I was wondering when creating a new feature in a shape file, QGIS asks to fill in the id in the attribute table for every feature created. Is there anyway to have this done automatically like ARCGiS does? Regards, Simon Muirhead Written from my Nexus 6P so don't expect Tolstoy. ___ Qgis-user mailing list Qgis-user@lists.osgeo.org<mailto:Qgis-user@lists.osgeo.org> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Auto-fill id in attribute table when creating a feature
Hi Simon, For Shape, I don't know - I don't use Shapefiles, unless I am forced to. One option would be to use SpatiaLite or Geopackage for production and then export to Shape for delivery to your client. But maybe someonw else knows how to autoincrement ids for Shapefiles ... hopefully. Greetings, Andreas On 2016-05-31 14:08, Simon Muirhead wrote: > Hi Andreas, "create layer" > "new shape file layer" e.g. .shp > > I've been waiting forever to be able to have gis software on my Mac! But I > need to use .shp to send back to the office e.g. arcgis on PC. > > Regards, Simon Muirhead > Written from my Nexus 6P so don't expect Tolstoy. > > On 31 May 2016 22:04, "Neumann, Andreas" wrote: > > Hi Simon, > > It is a bit data provider dependent. For many data providers (e.g. Postgis, > SpatiaLite, Geopackage) you just don't fill in this value (or better set the > edit widget to "read only") - provided that the database has a sequence > defined for the primary key column. The values are filled in when saving the > data. In 2.16 there is a new mode for PostgreSQL to immediately get the id > value (experimental). > > What data format are you using? > > Greetings, > > Andreas > > On 2016-05-31 13:43, Simon Muirhead wrote: > > Hi, I am new to QGIS, coming from ARCGiS. I was wondering when creating a new > feature in a shape file, QGIS asks to fill in the id in the attribute table > for every feature created. Is there anyway to have this done automatically > like ARCGiS does? > > Regards, Simon Muirhead > Written from my Nexus 6P so don't expect Tolstoy. > ___ > Qgis-user mailing list > Qgis-user@lists.osgeo.org > List info: http://lists.osgeo.org/mailman/listinfo/qgis-user > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Auto-fill id in attribute table when creating a feature
Hi Simon, It is a bit data provider dependent. For many data providers (e.g. Postgis, SpatiaLite, Geopackage) you just don't fill in this value (or better set the edit widget to "read only") - provided that the database has a sequence defined for the primary key column. The values are filled in when saving the data. In 2.16 there is a new mode for PostgreSQL to immediately get the id value (experimental). What data format are you using? Greetings, Andreas On 2016-05-31 13:43, Simon Muirhead wrote: > Hi, I am new to QGIS, coming from ARCGiS. I was wondering when creating a new > feature in a shape file, QGIS asks to fill in the id in the attribute table > for every feature created. Is there anyway to have this done automatically > like ARCGiS does? > > Regards, Simon Muirhead > Written from my Nexus 6P so don't expect Tolstoy. > ___ > Qgis-user mailing list > Qgis-user@lists.osgeo.org > List info: http://lists.osgeo.org/mailman/listinfo/qgis-user > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Auto-fill id in attribute table when creating a feature
Hi, I am new to QGIS, coming from ARCGiS. I was wondering when creating a new feature in a shape file, QGIS asks to fill in the id in the attribute table for every feature created. Is there anyway to have this done automatically like ARCGiS does? Regards, Simon Muirhead Written from my Nexus 6P so don't expect Tolstoy. ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user