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
3
votes
0answers
29 views

GeoPackage - Drag & Drop vs adding layers from connection

I am using QGIS 3.12.3, and created a GeoPackage through the layer panel by dragging and dropping both vector data (a polygon, a point and a tabular layer) and a raster underneath it. I even applied ...
0
votes
1answer
16 views

Extract Layer with Wildcard (*) or by Index

In the Geopackage below (in.gpkg) I would like to extract the first layer (i.e. pinios_eudem2_basins) and write it to a new Geopackage (out.gpkg). However I would like to do this not by name, but with ...
0
votes
0answers
19 views

Feature count of my QGIS geopackage vector layer different by 1 less feature, than when the layer is exported as a DXF

So when I put the geopackage into QGIS the feature count says there are 7519 features. I then export this layer as a DXF and when I open it in Rhino it states there are 7520 hatches. See images below. ...
3
votes
0answers
58 views

How to add .sld or .qml to .GPKG containing rasters using python

I'm looking for a pythonic way to add style layers to a Geopackage. I've checked out this and this, and both show how to do it in QGIS gui but not Python. I have a .sld file and want to add it to the ...
1
vote
1answer
25 views

Improve SQLite spatial query speeds for multilayer gpkg and Python

I have a GeoPackage with two polygon layers (WGS84). The first layer is an Sentinel 2 tile grid with about 800 polygons. The other layer is about 300 000 small polygons (AOIs). Each layer has an rtree ...
2
votes
0answers
41 views

GeoPackage with German Umlauts not working with QGIS

I created a GeoPackage file with different names for the table which contains the geometry information. First I tried the German "Gebäude" and I could not open the GeoPackage file with QGIS. ...
2
votes
1answer
51 views

How do I create a geometry using WKT in SQL INSERT statement for geopackage layer in QGIS

In QGIS 3.18.2, I am trying to create a geometry from WKT in a geopackage layer using SQL. My ultimate goal is to use this in a trigger, but first I need to get this INSERT STATEMENT working. In the ...
1
vote
1answer
22 views

Can OGR SQL dialect be used with GeoPackage?

I'm using GDAL (3.3.1) Python (3.8.11) bindings to process vector layers and am trying to use OGR SQL dialect to filter the layer, like this: sql = f"SELECT * from {out_lyr.GetName()} WHERE ...
3
votes
4answers
104 views

Why only overwriting is possible when saving layer in existing GeoPackage?

I try to save new generated layer to an existing GeoPackage. With "new generated layer" I mean to save layer by "save selected features as" or when I merge two layers or similar. ...
0
votes
0answers
26 views

Drag and drop gpkg with raster and vector layer to QGIS

I have a geopackage file containing a vector and a raster layer. When I drag and drop it from my explorer to QGIS (3.16) only the raster layer is beeing loaded. When i open the gpkg from within QGIS ...
0
votes
0answers
19 views

Collaborative Editing GPKGs with QGIS [duplicate]

Is there a way to have two users editing the same GPKG file (on different locations in the coordinates) collaboratively in a remote setting? We can also use something like a Virtual Desktop with multi-...
1
vote
0answers
36 views

Importing and updating raster table in GeoPackage using gdal-translate

Based on answered script from a previous question I continued studying GeoPackage documentation but I didn't found a solution to overwrite the table in GeoPackage when the original file (in '...
4
votes
1answer
57 views

Including metadata in GeoPackage file written using GeoPandas/Fiona

I have a Geopandas GeoDataFrame with a couple of categorical columns that I want to write to a GeoPackage file. GeoPandas/Fiona/GeoPackage does not support categorical columns directly, so I'm ...
2
votes
0answers
53 views

"Provider error" when saving the edits done to layer in GeoPackage

By means of the QGIS 3.16.3 I have created a GeoPackage with two layers, a point layer and a polygon layer. The point layer is named "pt", with attributes: geometry, sN, sE, sS, sW, uuid. ...
4
votes
1answer
79 views

QGIS Geopackage decimal field: cannot adjust Field Length and Precision

At 3.20.3, when creating a Decimal number (real) Geopackage field, the options to modify the Field Length and Precision are greyed out, as shown in the screenshot below. However, Field Length and ...
1
vote
0answers
28 views

GeoPackage: Nearest point from another table

I'm trying to use GeoPackages rather than PostGIS when teaching introductory classes, and that inevitably involves conversions between SQL variants. This time, I'm not able to get to a version of a ...
0
votes
1answer
69 views

Changing layer names when converting from WFS to Geopackage‏

I want to convert WFS to GeoPackage, everything is working fine but I need to change the name of each layer before converting to GeoPackage because the layer name has a special character ":"...
0
votes
1answer
40 views

Error while converting multiple layers (FeatureServer) to one GeoPackage

when I want to convert this FeatureServer as one GeoPackage using ogr2ogr on macOS, an error occurred with these messages Warning 6: driver ESRIJSON does not support open option NATIVE_DATA ERROR 1: ...
1
vote
1answer
35 views

Team access for remotely shared GeoPackage

I am looking for ways where an annotator using GeoPackage Layer can save the gpkg database somewhere that can be accessed by a supervisor/QA person for checking and corrections, save edits, and then ...
0
votes
2answers
110 views

Listing every layer in Geopackage using Fiona [duplicate]

I loaded a GeoPackage into Python and I can't figure out how to list all the layers in the file. How do I do that? Input: GeoPackage loaded into Python. Desired output: A list of the layers in the ...
2
votes
1answer
35 views

Spatialite does not use gpkg_spatial_ref_sys in GPKG mode

Spatialite and GPKG mode are enabled: SELECT load_extension('mod_spatialite'); SELECT EnableGpkgMode(); Spatialite knows about gpkg_spatial_ref_sys (gpkgInsertEpsgSRID() uses it), and the table is ...
1
vote
0answers
53 views

Encoding problem with a geopackage

I received a geopackage file and one of the attribute contains encoding mistakes for the Swedish letters ö, ä, å. How can I fix this with QGIS or FME ?
2
votes
1answer
70 views

QGIS graphical modeler and FID

I created a model to import different shape files coming from ARCMAP, to load them into my geopackage of my project. The model does different things: Delete attribute (OBJECTID, SHAPE_LENGTH and ...
0
votes
0answers
36 views

Unable to add geopackage to PostGIS database using OGR2OGR

I am using the following command to upload a geopackage into a POSTGIS database using the OSGeo4W shell that comes with QGIS. ogr2ogr -f “PostgreSQL” PG:”host=<hostname> dbname=<dbname> ...
0
votes
1answer
55 views

Unable to open gpkg files in R on HPC

I'm using R (v4.0.3) on my university's High Performance Computing cluster, loading gdal (v3.3.1), geos (v3.6.1), sqlite (v3.32.3), udunits (v2.2.26), and proj (v7.1.0) libraries prior to opening R. ...
1
vote
1answer
47 views

Exporting Oracle table with multiple geometry columns to gpkg by using ogr2ogr

I am using ogr2ogr to export a table in Oracle to GPKG. The table in Oracle has two columns (GEOMETRY_2, GEOMETRY_20) with geometry info. I am using the following ogr2ogr command to export the table ...
1
vote
1answer
43 views

Add new layer based on GeoPackage raster tiles

I am trying to create a new layer based on a GeoPackage raster file with PNG tiles. When I publish, I get this error: org.apache.wicket.WicketRuntimeException: Method onRequest of interface org.apache....
2
votes
0answers
75 views

Restoring GeoPackage from exported QField app

I have created a QGIS project and exported it as an offline-editing app for QField. I packaged the project using the QField Sync plugin and have several point layers (with offline editing) stored into ...
1
vote
0answers
55 views

QField raster GeoPackage [closed]

I tried converting my TIFF images to a geopackage (to decrease the file size) since I would be loading my project file to QField. However, upon packaging and opening my QField geopackaged project file ...
1
vote
1answer
24 views

Setting expression for two different table attribute to store as default style

I'm new on QGIS. I would like to store a default style in geopackage use by two different table attribute. First table with "building_height" , and second table with "block_height"....
0
votes
2answers
71 views

ogr2ogr loads spurious tables from GeoPackage using PostGIS driver

I am loading a GeoPackage file into PostgreSQL using the following command:- ogo2org -f PostgreSQL -oo LIST_ALL_TABLES=NO \ -lco OVERWRITE=YES \ -lco ...
1
vote
2answers
94 views

Make SQL spatial query for GeoPackage with PyQGIS in QGIS

I am trying to make SQL spatial query for GeoPackage with PyQGIS in my QGIS plugin. I get error message : "sqlite3.OperationalError: no such function: st_envelope" I can make the query ...
4
votes
1answer
84 views

Importing multiple raster files into GeoPackage

I'm looking for an alternative to import multiple raster files into a GeoPackage other than dragging and dropping via QGIS Browser (sometimes takes to long or returns error). Following this post I'm ...
0
votes
2answers
94 views

Adding layer to GeoPackage

While running the following code canvas = qgis.utils.iface.mapCanvas() layer = canvas.currentLayer() print(layer.name()) options = QgsVectorFileWriter.SaveVectorOptions() options.actionOnExistingFile =...
1
vote
0answers
48 views

Is it possible to store print templates (.qpt files) in a GeoPackage?

Every QGIS project file can have multiple print compositions which are listed in Composer Manager. These compositions are stored within the QGIS project and don't have to be saved separately. And QGIS ...
2
votes
2answers
79 views

Losing CRS definition saving to GeoPackage with PyQGIS

I'm using PyQGIS to run the processing algorithm "qgis:extractbyextent". The algorithm runs in a for loop using the current extent to perform the clip. Saving the OUTPUT to memory works fine ...
2
votes
2answers
133 views

Appending DataFrame to existing layer in GeoPackage

I have scripts to download and extract two shapefiles every 24 hours and create a cleaned DataFrame. I want to append the DataFrame for each one to a specific layer in a gpkg. The only example I can ...
2
votes
1answer
55 views

How to use spatial indexes in SQL queries made on geopackages

I'm trying to learn how to write geopackage SQL queries so that the r tree index is used, but I can't seem to find any good information. I'm just trying to write a simple query in the qgis db manager ...
3
votes
1answer
57 views

How to display real numbers with a desired number of decimal places when viewing an attribute table?

At 3.18.3, is there a way to display Geopackage real attribute values in an attribute table (with table view) with a user-specified number of decimal places, while maintaining the data's internal ...
5
votes
0answers
119 views

Why does simply opening a geopackage (gpkg) "modify" the file?

I'm really excited about transitioning to using geopackages instead of shapefiles, but I have one annoying problem. My datasets are synced with Box, and I'm working with a really large .gpkg file (3.2 ...
0
votes
1answer
92 views

GeoServer create geopackage mosaic

I have many rasters in a geopackage: I want to publish all as one layer in GeoServer so I try to add a new GeoPackage (mosaic): But I get the error The coverage store could not be saved. Failure ...
1
vote
2answers
58 views

QGIS randomly rotates images stored as Geopackage BLOB

BACKGROUND: At 3.18.3, this is my first experience with BLOB fields. I have created a standalone Geopackage table that contains a BLOB field (I'm not sure why Layer Properties calls it a QByteArray, ...
0
votes
1answer
38 views

Naming table when writing layer to geopackage using PyQGIS [duplicate]

I can create a new geopackage and write a tmp layer to it using code below: #Create a layer lyr = processing.run("native:randompointsinextent", {'EXTENT':'376242.90699403384,385761....
3
votes
1answer
1k views

Unique constraint failed error when saving GeoPackage in QGIS

In QGIS, when using Processing tools, the temporary output layer in many cases cannot be saved as Geopackage. This happens for example when using "Explode lines" or "Multipart to Single ...
2
votes
0answers
88 views

Filtering records in GeoPackage file by numeric/text fields using GeoPandas/Fiona

I have a GPKG file of 46M records and 6.5GB filesize, and need to open about 300 records, where fieldX = Y (Y may change). Opening the entire file would cause memory overflow, while processing the ...
3
votes
1answer
155 views

Reprojecting all layers in GeoPackage

In QGIS we can package all the layers using the "Package layers" tool but is there a way to also reproject all the component layers within the tool or using ogr2ogr? We have: processing.run(&...
3
votes
1answer
48 views

QGIS Refactor fields curiosity

Background: At 3.18.2 I have a Geopackage attribute table that I want to refactor, as shown in the screenshot below. I want to limit the field box_id length to 8. The table currently has 55 records, ...
0
votes
0answers
30 views

Saving multiple SimpleFeatureCollection in geopackage

Good day! Where I can see an example of saving multiple SimpleFeatureCollections (GeoPackage Plugin GeoTools) in geopackage file database? There are very few examples and training materials on the ...
1
vote
1answer
85 views

Using QGIS SpatiaLite/Geopackage databases on shared network drives

I am a GIS professional who has recently migrated over to QGIS from MapInfo and have been experimenting with the use of SpatiaLite and Geopackage databases to store our ecology data. I have structured ...
5
votes
2answers
251 views

How to write attribute-only tables in Geopackages with GeoPandas

I searched around and found similar questions (Writing Non Spatial Table into Geopackage - Python), but that discussion is on a slightly different topic. Is there a way to write attribute-only tables ...

1
2 3 4 5
8