Skip to main content

New answers tagged

1 vote

gpkg filename to add PostGIS table field

You can use the -sql flag to create arbitrary columns in the output. I've not got a PostGIS handy so I'm going to add to an existant table.gpkg file. It has 5 rows and the file column is all "nc1&...
Spacedman's user avatar
  • 65k
1 vote

Layers corrupted after saving, closing and opening of QGIS project with PyQGIS

I had missed adding the layer to the project, so it wasn't truly part of the project, it just appeared to be. The answer was to add the layer to the project without rendering it, and then add the ...
John_nz's user avatar
  • 31
0 votes

Looping through GeoPackage layers with GDAL

Sample used is available at A pure Python approach without any other deps than GDAL from osgeo import gdal gdal.UseExceptions() ...
ThomasG77's user avatar
  • 31k
0 votes

How to write two geopandas dataframes as layers of a .gpkg file in memory in python?

I haven't looked into doing this "properly" in any detail (i.e. using something like io.BytesIO(), see this issue), but here is a dirty workaround that uses gdal and its virtual ("VSI*&...
user2856's user avatar
  • 67k
0 votes

Open GeoPackage in spreadsheet with drag-n-drop

It seems like "Export as spreadsheet" with the geopackage is the simpliest way. Creating a .bat with the formula proposed above can work too.
MesanGeo's user avatar
0 votes

"Changing feature ID of feature 123 is not allowed" when saving a GeoPackage (.gpkg) layer in QGIS

I had this exact same error, and found it was caused by deleting the fid value of a feature (accidentally) before deleting the feature itself. The "$id" trick didn't work because the feature ...
destructulus's user avatar
1 vote

URI for adding GeoPackage to ArcGIS Pro

TLDR: LayerFactory.Instance.CreateLayer(new Uri(@"D:\MyGeoPackage.gpkg\main.MyLayerName", MapView.Active.Map); I deduced this by running an ArcPro GeoProcessing tool and then looking at the ...
narmaps's user avatar
  • 692
2 votes

QGIS geopackage on shared network, project does not appear

Geopackage is not suitable to be used on a remote drive, you should only use Geopackages that are stored locally. See here why: One downside to GeoPackage is that the underlying SQLite database is a ...
Babel's user avatar
  • 73.1k

Top 50 recent answers are included