Questions tagged [geopackage]

GeoPackage is an OGC format for vector, tiled and raster data, plus associated metadata, built on top of SQLite. It is described as the modern alternative to formats like SDTS and Shapefile.

Filter by
Sorted by
Tagged with
0 votes
1 answer
29 views

MbrIntersects returns all features in layer

I want to add features to a gpkg using python, but before I add them, I want to test if they intersect with the gpkg_layer. For performance, I want to first filter the gpkg_layer using the bounding ...
ThiPa's user avatar
  • 649
1 vote
1 answer
38 views

Exporting project to a GeoPackage

I have a QGIS project that includes various types of files: multiline string, multipolygon, point data, and geotiffs of various multispectral outputs with unique symbologies within a 5-level folder ...
Jojo's user avatar
  • 11
0 votes
0 answers
14 views

Problem while saving new objects

When I create new objects in QField (3.1.6, they cannot be saved. A error message says "Unable to save changes" (in german: "Speichern nicht möglich" with a red dot beside. ...
Jakob_DB_EC's user avatar
1 vote
0 answers
23 views

Synchronizing qgsofflineediting database data back to remote layers using PyQGIS

I have a situation where I need to find the path(database) of GeoPackage, if the path has already exist then I need to use the existing GeoPackage data to load the offline data using qgsofflineediting ...
Nihar Sahoo's user avatar
0 votes
1 answer
51 views

Why the buffer geometry column in the GeoDataFrame is in point form although it's actually in polygon form?

I wanted to create a 1.5km buffer for each geocoded point. Here's the screenshot of the geocoded points dataframe. So I overwrote the geometry column using the code below: shopping_centres['geom'] = ...
mfirdaus_96's user avatar
1 vote
0 answers
52 views

SQLite/GeoPackage over a network [closed]

In our organisation we work with data stored on an Azure network file server - pretty typical for an office. We use QGIS to read geodata files (SQLite/GeoPackage) across this network and it seems to ...
Mr_Robinini's user avatar
0 votes
0 answers
66 views

SQL access to GEOPackage data

I am new to the world of QGIS. I work for a company that records birds in order to prepare expert reports. I am actually a programmer and would like to make my life a little easier when analysing the ...
Harry1980's user avatar
1 vote
0 answers
50 views

Defining additional fields in a pivot table of a N-M relation in QGIS

I have a N-M relation in a GeoPackage, defined using QGIS 3.32. For the sake of this question you can consider the "airports - airlines" example on the QGIS documentation: https://docs.qgis....
barotto's user avatar
  • 11
0 votes
0 answers
38 views

Package Layers to Geopackage stripping layers of all data using QGIS

I am having a strange issue with packaging temporary layers to a geopackage and would like to try and figure out whether I am doing something wrong before I file a bug report. I have about 180 points ...
Andy Baader's user avatar
0 votes
1 answer
51 views

Attributes are not saved in gpkg from geopandas

I am trying to save geopandas dataframe into .gpkg while attributes are not shown when I open with qgis. I have tried: filename = f'{layer_name}_{timestr}.gpkg' gdf = gpd.GeoDataFrame.from_features(...
Miko's user avatar
  • 39
2 votes
1 answer
94 views

How to use ogr2ogr's spat_extent keyword to clip a layer of a GPKG file?

I am trying to clip geometries within a GPKG file using a bounding box. I write an L-shaped line to a file: import geopandas as gpd import shapely.geometry l = shapely.geometry.LineString([[0,2],[0,-...
zabop's user avatar
  • 1,810
0 votes
0 answers
40 views

Adding several different rasters to Geopackage containing project using PyQGIS

I want to store different kinds of data in a project that would be stored on a geopackage. This will allow me to have all the information I'm interested in a single file. I'm a Data Engineer and I ...
Octave's user avatar
  • 1
0 votes
0 answers
60 views

ogr2ogr MSSQL to geopackage encoding

I'm exporting data from a MSSQL server to geopackage. "C:\OSGeo4W\bin\ogr2ogr.exe" -f "GPKG" "C:\folder\tables.gpkg" "MSSQL:server=theserver;database=thedb;driver=...
BERA's user avatar
  • 71.2k
1 vote
1 answer
103 views

How do I add a new column to a GPKG file using ogrinfo?

I create an example file, example.gpkg using Python: import geopandas as gpd import shapely.geometry gdf = gpd.GeoDataFrame.from_dict(dict( geometry=[shapely.geometry.Point([0, 0]), shapely....
zabop's user avatar
  • 1,810
1 vote
2 answers
85 views

Exporting selected features in geopandas - GeoPackage vs SHP

I have a polygon layer representing buildings as a SHP and GeoPackage. I am selecting a subset of these polygons and save it in a selected.txt file containing something like "gid=65 or gid=562 or ...
banbar's user avatar
  • 999
0 votes
1 answer
32 views

Can add points and synchronize a point layer successfully, but cannot edit within QField

I can't seem to edit a simple point feature layer in QField. I have a point feature layer within a GeoPackage which has a few value mapped fields as well as the option for attachments. All fields are ...
Benjamin Bezte's user avatar
2 votes
1 answer
49 views

Load Project from GeoPackage not available to user of QGIS

A colleague of mine is attempting to open a project from a geopackage I have created. The easiest method I found for them to use is to simply follow the following steps: Project -> Open From -> ...
Nathan S's user avatar
2 votes
0 answers
55 views

Appending/translating CSV data to GeoPackage with drop drown attribute Fields

I will preface this with some context. I've created a data collection Project that I use in QField, comprised of multiple Geopackage layers that have been heavily modified in the Attribute Forms ...
Kelson Willms's user avatar
1 vote
1 answer
103 views

Load default project from GPKG

One can store QGIS projects in GPKG files. This is handy if one wants to keep data and representation tightly together. Is there a way to configure or define a project, which is stored in a GPKG, so ...
bugmenot123's user avatar
  • 11.2k
0 votes
0 answers
33 views

Fetch data from a WFS endpoint and add it to a GeoPackage layer field automatically

I have a GeoPackage layer with multiple attributes. Some of the attributes should be fetched using a WFS endpoint. This means, I send the coordinates of the current dataset to the WFS endpoint and get ...
harrow's user avatar
  • 101
2 votes
1 answer
146 views

Fast selection of intersecting geometries in GPKG file

I have a GPKG file, example.gpkg, with 2 layers, base and circles. There is only 1 geometry in base, and there is a large number of geometries in circles. I would like to select all the geometries in ...
zabop's user avatar
  • 1,810
4 votes
2 answers
157 views

How do I view the contents of spatial indexes of a GPKG file?

I create an example GPKG file, example.gpkg, with layer our_layer: import geopandas as gpd import shapely.geometry gpd.GeoSeries( [ shapely.geometry.Polygon([[0, 0], [1, 0], [1, 1]]), ...
zabop's user avatar
  • 1,810
1 vote
0 answers
37 views

Adding vector layer to existing GeoPackage using PyQGIS: writeAsVectorFormatV3()

I need to save (mostly) virtual layers to an existing geopackage. Since I was required to use the layerOptions parameter for primary key handling I changed my code to use writeAsVectorFormatV3(). As ...
maxwhere's user avatar
  • 1,158
2 votes
2 answers
76 views

Invalid unixTime error when processing GPKG file with ogr2ogr

I am looking at forestry data of Finland's Etelä-Savo region. I download the data: curl -L -O https://avoin.metsakeskus.fi/aineistot/Metsankayttoilmoitukset/Maakunta/MKI_Etelä-Savo.zip Unzip it: ...
zabop's user avatar
  • 1,810
7 votes
2 answers
332 views

Fast subtraction of geometries in GPKG file

I have a GPKG file, with 2 layers, p and q. I would like to create a third layer, r. I would like r to contain those parts of p which do not intersect with q. We could phrase this as r=p-q. Below is a ...
zabop's user avatar
  • 1,810
0 votes
0 answers
54 views

Triggers for multiple tables in Geopackage and DB Browser for SQLite for QGIS use

I need to build an automatic trigger in the database so that when inserting/updating a new polygon in the SETORES feature and filling in the CD_GEOCMU key attribute with the appropriate code, for ...
Denilson's user avatar
  • 695
9 votes
3 answers
332 views

Use PyQGIS to save memory layer to GeoPackage that does not already exist

I have an issue using PyQGIS to save a memory layer to a GeoPackage that does not already exist. This is equivalent to using the Make permanent... option in the Layers context menu, to save to a new ...
Tom Brennan's user avatar
  • 4,362
2 votes
1 answer
166 views

How to 'embed' files into geopackage to make it self-sustaining? (QGIS)

I've created a geopackage in QGIS (3.22.1), by setting up groups and subgroups in my Layers pane, and then simply going to File -> Save To -> GeoPackage. Now if the source files are moved from ...
Kevin K's user avatar
  • 41
2 votes
1 answer
53 views

"Incorrect parameter value for LAYERS" error when saving CSV to GeoPackage with PyQGIS

I am using QGIS 3.32.3 and am trying to save a CSV file to a GeoPackage with PyQGIS using the current directory as part of the string. When trying to do this it shows: 'Incorrect parameter value for ...
user233372's user avatar
0 votes
1 answer
129 views

Import GeoPackage(GPKG) to PostGIS with styles

I've tried to import GPKG file data into PostGIS using ogr2ogr, but can't seem to understand if it is possible to import the style symbology contained within the GPKG aswell. I've noticed ogr2ogr adds ...
Geospatial Data Enjoyer's user avatar
0 votes
1 answer
80 views

ogr2ogr skipping rows when converting from osm.pbf to gpkg

I am downloading an osm.pbf file from the Geofabrik download server and running the following command: ogr2ogr -f GPKG norcal-latest-multipolygons.gpkg norcal-latest.osm.pbf -sql "SELECT * FROM ...
user233253's user avatar
1 vote
0 answers
79 views

QGIS How to display PDF saved as BLOB

I have a file where locations have photos and PDF attachments stored as BLOBs. Using the HTML widget, I have gotten it to show the photos as per a previous answer on this forum. I'm not sure how to do ...
Leo Wang's user avatar
1 vote
1 answer
557 views

Speed up reading gpkg as GeoPandas dataframe

I have multiple point gpkg files which I would like to use with GeoPandas, however, reading files into the script takes always very long when files are bigger > 150MB. Generally I just read the ...
i.i.k.'s user avatar
  • 1,271
1 vote
0 answers
107 views

Domain in gpkg QGIS

I try to set the field domain for GeoPackage table fields. (description in : see qgis changelog) I want but I can't use glob domain (with regex constraint), I try many syntax in pattern : '[A-Z]' , &...
pasqal's user avatar
  • 506
1 vote
2 answers
60 views

Geopackage trigger doesn't work

I use this trigger on a geopackage table: CREATE TRIGGER upd_iae_surf AFTER UPDATE ON "IAE CRD Surf" BEGIN UPDATE "IAE CRD Surf" SET "taille" = ROUND(ST_Area(NEW.geom)/...
Etienne's user avatar
  • 497
1 vote
0 answers
24 views

ogr2ogr only imports 99999 rows of geopackage layer to PostGIS database

I am using the ogr2ogr command to upload a geopackage layer to my PostGIS database. The layer has 130'870 objects/rows. I am using this code: ogr2ogr --debug ON -progress -f "PostgreSQL" PG:&...
theo_maptransfer's user avatar
1 vote
0 answers
80 views

How do I make the GeoServer GeoPackage Output extension produce valid text fields?

We have the GeoPackage Output extension on our GeoServer. However, a WFS GetFeature request with outputformat=gpkg returns a geopackage with invalid text fields. An attempt to read the geopackage ...
eshepherd's user avatar
0 votes
0 answers
29 views

GeoServer polygon artifacts on GeoPackage

I am brand new to GeoServer (2.23.1) and have it running on a Debian 11 Podman container. I can access all the sample data, which all renders as expected. I am following the GeoServer Getting Started ...
rytz's user avatar
  • 1
1 vote
0 answers
31 views

Adding GeoPackage data (covering whole country) to specific area of the country in QGIS

I have a big GeoPackage of building data for a whole country. I want to add only building data for a certain part of the country. I have tried adding the whole data package and then "select by ...
Tessa Bell's user avatar
1 vote
2 answers
128 views

How to see the size of individual layers in a geopackage

How can we see the disk size of individual layers that are packed together in a geopackage? I am a big fan of keeping all layers (and their styles) of a QGIS project inside one geopackage only. Its ...
Adamski's user avatar
  • 81
4 votes
0 answers
101 views

QGIS: Create New Relationship gdb vs. gpkg

I'm looking for an option to store different relationships directly in the database. When I add the gdb/gpkg into a project the relationships should be loaded automatically too. For a gdb I can choose ...
stm_21's user avatar
  • 41
1 vote
0 answers
138 views

Error when trying to export geopackage

I'm trying to export a layer which is a geopackage consisting of many linestring shapes. However when I try to export, I get the below error message. How to solve this issue?
Leah's user avatar
  • 11
1 vote
1 answer
251 views

Converting GPKG to GDB-Feature Class with gdal.VectorTranslate [closed]

I am trying to convert a geopackage (GPKG) to a ESRI GDB feature class using gdal.VectorTranslate(). My code is like: translate_options = gdal.VectorTranslateOptions(format="OpenFileGDB", ...
Ferid1985's user avatar
7 votes
2 answers
340 views

Adding metadata that describes each attribute field in QGIS

Using a GeoPackage layer at 3.28.9, I would like to add descriptive information for each of the layer's attribute fields as metadata. However, there is no Layer Properties > Metadata tab for ...
Stu Smith's user avatar
  • 8,172
1 vote
2 answers
76 views

Request features within a polygon from PostGIS or GeoPackage with PyQGIS

With the PyQGIS API, I have a QgsVectorLayer object that is sometimes a GeoPackage/SHP layer, sometimes a PostGIS layer. I have a working code to get all features within a given polygon "frame&...
superrache's user avatar
0 votes
0 answers
35 views

Share one layer between many projects in QField Cloud

Is it possible to have several different projects access and update the same layer/geopackage file on the cloud? I.e two different projects include the same layer, and when it is updated on one the ...
SHall's user avatar
  • 21
0 votes
0 answers
49 views

Error saving joined features in existing Geopackage gpkg from QGIS Model Designer

I have created a Model Designer to automate a routine task. The problem comes when saving the generated data in an existing geopackage. By joining attributes by location I generate around 10 points. ...
tupad's user avatar
  • 1
0 votes
0 answers
74 views

Geopackage no such table: main.gpkg_ogr_contents when deleting table contents

I want to delete contents in several tables in geopackage using the following command DELETE FROM main.tablexyz I’m able to delete some of my tables using this command but run into this error in a ...
cipriani's user avatar
0 votes
1 answer
286 views

ogr2ogr error: Couldn't fetch requested layer when appending multiple geopackages

I've got two geopackages and I want to combine them to the output ‘output.gpkg’. One of my geopackage contains reference master tables (20 tables) and the another one contains dynamic information (5 ...
cipriani's user avatar
2 votes
1 answer
231 views

Renaming .gpkg file in QGIS

I am using QGIS 3.28. I don't like the name of one of my current .gpkg file ("test"). I've tried saving it a few different ways, but the new versions always seems to point back to the ...
Jeff Boggs's user avatar

1
2 3 4 5
12