[GRASS-user] Import gpkg point map

Markus Neteler neteler at osgeo.org
Wed Jun 26 13:57:50 PDT 2019


Hi

Markus Metz <markus.metz.giswork at gmail.com> schrieb am Mi., 26. Juni 2019,
22:45:

>
>
> On Wed, Jun 26, 2019 at 10:16 PM Micha Silver <tsvibar at gmail.com> wrote:
> >
> >
> > On 26/06/2019 23:03, Markus Metz wrote:
> >
> >
> >
> > On Wed, Jun 26, 2019 at 4:58 PM Micha Silver <tsvibar at gmail.com> wrote:
> > >
> > > I am trying to import some geopackage files. Some are polygons, and
> one is a points vector. The polygons import fine, but the point vector
> fails with:
> > >
> > > ERROR: Detected different projections of input layers. Input layers
> must be
> > >        imported separately.
> > >
> > >
> > > Then if I convert the gpkg to a shapefile, it works fine.
> > >
> > >
> > > Any ideas what could be wrong? Here's the procedure, showing the
> problem.
> > >
> > [...]
> > >
> > > # Now The point gpkg vector:
> > >
> > > ######################
> > >
> > > micha at TP480:Ashalim$ ogrinfo ashalim_train_pts.gpkg ashalim_train_pts
> >
> > are there any other layers in ashalim_train_pts.gpkg?
> > You can check with
> > ogrinfo -so ashalim_train_pts.gpkg
> >
> >
> > micha at TP480:code$ ogrinfo -so ../GIS/Ashalim/ashalim_train_pts.gpkg
> > INFO: Open of `../GIS/Ashalim/ashalim_train_pts.gpkg'
> >       using driver `GPKG' successful.
> > 1: ashalim_train_pts (Point)
> > 2: layer_styles (None)
> >
> >
> > The style ??!!
> >
> >
> > I removed that "layer_styles" table from the gpkg db, and deleted the
> entry from gpkg_contents, and now the import works.
> >
> > Who would have guessed ?
> >
> > I suppose that I should have specified the layer in v.import to avoid
> this problem.
>
> Yes, specifying the layer should work.
>
> I have seen this layer_styles layer before in other GPKG files but don't
> know what this is good for. GDAL documentation at
> https://gdal.org/drivers/vector/gpkg.html
> does not mention any style information.
>
> AFAICT, layers in a GPKG should contain vector geometries.
>


There seems to be something upcoming:

https://gis.stackexchange.com/questions/268746/writing-style-information-into-geopackage-with-python-and-gdal

Perhaps the "(None)" info could be used to identify and ignore that style
layer?

markusN



_______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20190626/c7ebbfbb/attachment.html>


More information about the grass-user mailing list