[QGIS-Developer] Question on @atlas_featureid

Andreas Neumann andreas at qgis.org
Thu Jul 8 02:50:34 PDT 2021


Ok - that explains it.

It is quite confusing that QGIS uses a different internal ID than the
primary key column of the database. Is there a technical reason for this
behaviour?

Andreas



On Thu, 8 Jul 2021 at 11:43, Alexandre Neto <senhor.neto at gmail.com> wrote:

> As far as I remember @atlas_featureid has always returned the same as the
> $id in the attributes table, which is kind of the internal row number.
>
> Alex
>
> A quinta, 8/07/2021, 10:35, Andreas Neumann <andreas at qgis.org> escreveu:
>
>> HI Jürgen,
>>
>> Yes - I provided the primary key column
>>
>> Here is my data source string:
>>
>> service='edit' authcfg=sogis00 key='t_id' srid=2056 type=Polygon
>> checkPrimaryKeyUnicity='1'
>> table="alw_strukturverbesserungen"."projekt_aggregiert_v"
>> (geometrie_convex_hull) sql=geometrie_bbox IS NOT NULL
>>
>> @atlas_featureid returns something like an internal "row number" or
>> similar, but not the column "t_id" as defined in the data source string.
>>
>> Andreas
>>
>> On Thu, 8 Jul 2021 at 10:42, Jürgen E. Fischer <jef at norbit.de> wrote:
>>
>>> Hi Andreas,
>>>
>>> On Thu, 08. Jul 2021 at 10:30:08 +0200, Andreas Neumann wrote:
>>> > attribute(@atlas_feature,'pkey_name'), but it is a little more
>>> complicated
>>> > than @atlas_featureid - and I'm pretty sure that @atlas_featureid was
>>> using
>>> > the pkey column in th past?
>>> >
>>> > My data source for the atlas coverage layer is a Postgis View.
>>>
>>> It's probably not using the column you expect for the feature id.  Did
>>> you
>>> specify the key column when adding the view?
>>>
>>>
>>> Jürgen
>>>
>>> --
>>> Jürgen E. Fischer           norBIT GmbH             Tel.
>>> +49-4931-918175-31
>>> Dipl.-Inf. (FH)             Rheinstraße 13          Fax.
>>> +49-4931-918175-50
>>> Software Engineer           D-26506 Norden
>>> https://www.norbit.de
>>> QGIS release manager (PSC)  Germany                 IRC: jef on
>>> Libera|OFTC
>>> _______________________________________________
>>> QGIS-Developer mailing list
>>> QGIS-Developer at lists.osgeo.org
>>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>>
>>
>>
>> --
>>
>> --
>> Andreas Neumann
>> QGIS.ORG board member (treasurer)
>> _______________________________________________
>> QGIS-Developer mailing list
>> QGIS-Developer at lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>

-- 

--
Andreas Neumann
QGIS.ORG board member (treasurer)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20210708/9e622aef/attachment-0001.html>


More information about the QGIS-Developer mailing list