[Qgis-developer] Fwd: [Qgis-user] QGIS problem with GeoPackage database views
Even Rouault
even.rouault at spatialys.com
Sun Jun 26 12:22:11 PDT 2016
Le dimanche 26 juin 2016 21:15:24, Richard Duivenvoorde a écrit :
> On 26-06-16 20:27, Matthias Kuhn wrote:
> > Hi
> >
> > On 06/26/2016 08:23 PM, Richard Duivenvoorde wrote:
> >> @Marcus: forwarding this to the Developers mailing list, as I think
> >> there are more people there who maybe can help.
> >> Good that you publish both data + problems! Even better maybe create
> >> issues (with if possible more slimmed down dataset)...
> >
> > An issue report would certainly be good.
> >
> > My first wild guess reading this is that there is some trouble with the
> > mapping the feature id to primary keys.
>
> One additional observation (fresh master of today):
>
> - I downloaded the dataset
> - loaded the layer/view sa1_bo1_map_v into QGIS
> - opened the attributetable and see all the same values in the cells
>
> But
> - Open DB Manager (Plugin?),
> - Create a connection to it
> - Select this sa1_bo1_map_v node
> - I see the correct(?) cell values (and very fast, compared to QGIS
> itself?)
>
> When I open with browser, I get the same wrong result...
The issue is that the OGR GeoPackage driver cannot derive an integer primary
key from the view, and affects 0 as the fid for all features. In the case of the
views of this particular dataset, the OBJECTID field could be used as the FID
(given some logic to be implemented in the driver to analyze the structure of
the view, the underlying tables and the unicity constraints on the join fields)
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the Qgis-developer
mailing list