<div dir="auto"><div>Hi<br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Markus Metz <<a href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a>> schrieb am Mi., 26. Juni 2019, 22:45:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><br>On Wed, Jun 26, 2019 at 10:16 PM Micha Silver <<a href="mailto:tsvibar@gmail.com" target="_blank" rel="noreferrer">tsvibar@gmail.com</a>> wrote:<br>><br>><br>> On 26/06/2019 23:03, Markus Metz wrote:<br>><br>><br>><br>> On Wed, Jun 26, 2019 at 4:58 PM Micha Silver <<a href="mailto:tsvibar@gmail.com" target="_blank" rel="noreferrer">tsvibar@gmail.com</a>> wrote:<br>> ><br>> > 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:<br>> ><br>> > ERROR: Detected different projections of input layers. Input layers must be<br>> > imported separately.<br>> ><br>> ><br>> > Then if I convert the gpkg to a shapefile, it works fine.<br>> ><br>> ><br>> > Any ideas what could be wrong? Here's the procedure, showing the problem.<br>> ><br>> [...]<br>> ><br>> > # Now The point gpkg vector:<br>> ><br>> > ######################<br>> ><br>> > micha@TP480:Ashalim$ ogrinfo ashalim_train_pts.gpkg ashalim_train_pts<br>><br>> are there any other layers in ashalim_train_pts.gpkg?<br>> You can check with<br>> ogrinfo -so ashalim_train_pts.gpkg<br>><br>><br>> micha@TP480:code$ ogrinfo -so ../GIS/Ashalim/ashalim_train_pts.gpkg<br>> INFO: Open of `../GIS/Ashalim/ashalim_train_pts.gpkg'<br>> using driver `GPKG' successful.<br>> 1: ashalim_train_pts (Point)<br>> 2: layer_styles (None)<br>><br>><br>> The style ??!!<br>><br>><br>> I removed that "layer_styles" table from the gpkg db, and deleted the entry from gpkg_contents, and now the import works.<br>><br>> Who would have guessed ?<br>><br>> I suppose that I should have specified the layer in v.import to avoid this problem.<br><div><br></div><div>Yes, specifying the layer should work.</div><div><br></div><div>I have seen this layer_styles layer before in other GPKG files but don't know what this is good for. GDAL documentation at</div><div><a href="https://gdal.org/drivers/vector/gpkg.html" target="_blank" rel="noreferrer">https://gdal.org/drivers/vector/gpkg.html</a></div><div>does not mention any style information.</div><div><br></div><div>AFAICT, layers in a GPKG should contain vector geometries.</div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">There seems to be something upcoming:</div><div dir="auto"><br></div><div dir="auto"><a href="https://gis.stackexchange.com/questions/268746/writing-style-information-into-geopackage-with-python-and-gdal">https://gis.stackexchange.com/questions/268746/writing-style-information-into-geopackage-with-python-and-gdal</a></div><div dir="auto"><br></div><div dir="auto">Perhaps the "(None)" info could be used to identify and ignore that style layer?</div><div dir="auto"><br></div><div dir="auto">markusN</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org" target="_blank" rel="noreferrer">grass-user@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/grass-user" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/grass-user</a></blockquote></div></div></div>