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
0 answers
28 views

Read GeoPackage with geopandas

I develop an import system that supports popular geoformats. Sometimes I get a DriverError reading GeoPackage files with geopandas, but at times it works well. My code is simple: gdf = gpd.read_file(...
user avatar
0 votes
1 answer
17 views

'QGIS Processing Executor'_Issue: "sqlite3_open ... unable to open database file"

Trying to run a self built-in QGIS-model (*.model3) using the followoing 'QGIS Processing Executor' (qgis_process) command in the command line does not work. C:\Program Files\QGIS 3.24.1\apps\Qt5\bin&...
user avatar
0 votes
1 answer
37 views

PyQGIS script (.py) runs correctly on Windows but not on Mac

I wrote a script that takes a vector layer already present in my QGIS project and refactor fields as I wish. I created the script to avoid doing plenty of times the same refactorization manually every ...
user avatar
  • 47
0 votes
1 answer
30 views

GDAL loop through gpkg layers

I've a gpkg with several vector layers inside, i'd like to build a spatial index for each I'm using very simple gdal/sql process: ogrinfo -SQL "SELECT CreateSpatialIndex('gis_layer_01', 'geom')&...
user avatar
  • 91
0 votes
1 answer
60 views

Handling too many geopackages in QGIS

I have been using this 3.24 for a month or more. Now that I am using it, I have created every project using this one. I am facing an issue with this version (not sure if this problem is only for this ...
user avatar
  • 1
0 votes
0 answers
29 views

Exporting all layers from folder holding temporary layers as gpkg using PyQGIS

I tried exporting all temporary scratch layers residing in a projects specific folder using PyQGIS as .gpkg format, also to mention that exported .gpkg files have to be visible in the project after ...
user avatar
0 votes
0 answers
31 views

Obtain CRS compliant WKT from GeoPackage with ogrinfo

I would like to obtain the WKT for a few geometries stored in a GeoPackage file with orginfo. That is the function of the -al parameter. However, when applied directly to the file in question it ...
user avatar
3 votes
1 answer
103 views

GeoPackage, SQLite: features count but don't exist (QGIS)

GeoPackage is my favorite geo-format but I also have some strange behaviors. One of them: I delete all records/features within a table using QGIS -> Delete Features or SQL statement but there are ...
user avatar
  • 7,663
1 vote
0 answers
30 views

Different number of records in gpkg vs. shapefile after join

I'm using pyqgis 3.10.1.and trying do Spatial join with one-to-many option for points and multipolygon. After processing result shows me too low number of records. I save results to geopackage but ...
user avatar
0 votes
0 answers
18 views

Can Rasterio python package read/open rasters stored in a Geopackage? [duplicate]

I've searched a lot and I couldn't find any code sample using rasterio to open rasters stored in a Geopackage. If someone knows anything about this topic, I would be greateful if the knowledge could ...
user avatar
1 vote
1 answer
62 views

How can I read a raster in a Geopackage with python?

I'm having a hard time trying to read (with python) a raster that I've saved in a Geopackage. I thought there would be a simple like rasterData = rasterio.open(gpkgPath, layer='DEM'), but when I run ...
user avatar
4 votes
2 answers
196 views

Geopackage in QGIS: Search and replace in all attribute fields at once

The context I have a Geopackage file opened in QGIS. It was created by importing a CSV file. However, when importing, something regarding encoding went wrong: I have several special characters like ...
user avatar
  • 40.1k
0 votes
0 answers
11 views

Geopackage Arc Geometry in ArcGIS Pro

I have a question regarding the Geopackage Geometry circular arc within ArcGIS Pro 2.7: Within the information it is stated that following geometries are supported: What can you do with a GeoPackage ...
user avatar
3 votes
2 answers
69 views

Merging/Dissolving multiple layers in QGIS Virtual Layer

I have several polygon layers that I would like to merge and dissolve within a virtual layer in QGIS. So that any changes made to the individual layers will automatically update in the merged/...
user avatar
  • 33
0 votes
0 answers
83 views

How should we display GeoPackage on Mapbox GL JS?

We used wgrib2 to convert weather radar data into NetCDF format. We converted it to GeoPackage format using gdal_translate. We created a Color Map on QGIS 3.10 and the GeoPackage appeared as expected. ...
user avatar
  • 101
0 votes
2 answers
45 views

Loading specific layer by its name from GeoPackage

How can I load a specific layer by its name from a GeoPackage into the project. I tried the graphical model designer, but it always loads a layer from the geopackage and labels it with my layer name (...
user avatar
  • 159
0 votes
0 answers
94 views

Importing shapefile into a geopackage not working in QGIS 3.24.1

Whenever I try to import any kind of .shp file (with any kind of geometry) to any gpkg database, it gives numerous errors, such as: Error 7 Failed to load layer or Error 5 Failed to create fid field (...
user avatar
2 votes
1 answer
65 views

Virtual-Layer/SQL-View: SQL to get list of all values in a group (SpatiaLite/GeoPackage) [closed]

I have a GeoPackage-Table and it's looking like that: id data -- ---- 1 A 1 A 1 B 2 A 2 B 3 B 3 B I need a virtual layer or a SQL-View that should look like that: id data --...
user avatar
  • 7,663
1 vote
0 answers
60 views

Repairing corrupted geopackage

QGIS doesn't recognize a geopackage ("invalid source"), DB Manager connects to the gpkg but doesn't find the file ("file not found") when trying to open. The software DB Browser ...
user avatar
0 votes
1 answer
30 views

Unable to make GeoPackages and MBTiles compatible in MapTiler Cloud using gdal_translate

I'm using gdal_translate to convert TIF files to GeoPackage and MBTiles. The geopackage/MBTiles are uploaded to MapTiler Cloud. They upload to MapTiler Cloud even if they are not "clean tileset&...
user avatar
  • 1,139
2 votes
1 answer
46 views

Deleted Layer in Geopackage still visible in QGIS

I have created a multitable Geopackage as a Database. After some work, I decided to replace one layer with a different layer, so I created a new layer and deleted the old one via the DB-Manager in ...
user avatar
  • 1,446
1 vote
0 answers
63 views

Save GeoPandas geodata frame into a file including symbology to open in QGIS [closed]

I'm working in Python with the GeoPandas library, and I would like to save GeoDataframes into shapefiles or geopackage files with symbology. I've read that in QGIS, it is possible to save the ...
user avatar
0 votes
1 answer
58 views

Reset fid in GeoPackage table

Is it possible to reset the fid of my GeoPackage table so it begins with value '1' again after clearing the table? The background is: I have a more or less complex table I would like to "reuse&...
user avatar
  • 7,663
-1 votes
1 answer
48 views

SQL statement for count of different ranges [closed]

In QGIS, I want to make a SQL-statement which should return the counts of different year ranges e.g. in column 1 should be the total count for distinct values for all years, in column 2 1950-1990, in ...
user avatar
  • 851
0 votes
1 answer
51 views

setAlias doesn't work on geopackage

I'm trying to add multiple fields to a geopackage layer and set their aliases at the same time. It is working on a temp layer but not on the geopackage, why? lyr = iface.activeLayer() p = lyr....
user avatar
  • 51.4k
4 votes
1 answer
121 views

QGIS Geopackage saves layers in wrong order

I would like to save my file as the .geopackage file. Unfortunately, I've noticed that the order of the layers is not correct. It doesn't correspond to the order in the "Layers" panel. I saw,...
user avatar
  • 3,546
8 votes
1 answer
117 views

Meaning of maximum field length of 0 for GeoPackage in QGIS

I have looked around for the answer, but have not found anything reliable. When creating a new layer or new fields in a GeoPackage one sometimes has to enter the parameter Maximum Length, sometimes ...
user avatar
  • 1,446
4 votes
1 answer
94 views

QGIS 3.22 sorting by attributes does not work in gpkg-files

Since I updated from QGIS 3.16 to 3.22 I have the following problem in attribute tables: in gpkg files the sorting option (alphabetical) does not work - sometimes! I tried it with projects in qgz- or ...
user avatar
  • 309
2 votes
1 answer
22 views

Deleting entries (duplicates) from a GPKG using OGR

I tried to delete duplicates from a GPKG file using ogr2ogr and a SQLite statement from SO: ogr2ogr -sql "DELETE FROM layer WHERE rowid NOT IN (SELECT MIN(rowid) FROM layer GROUP BY ...
user avatar
5 votes
1 answer
106 views

Automatically fill in attributes of parent feature in QGIS

I have a data table that holds different information about buildings in a GeoPackage. Different elements of the buildings can be entered, e.g. sometimes I only have the building as a whole, sometimes ...
user avatar
  • 1,446
6 votes
1 answer
259 views

Renaming GeoPackage layer to be the same as GeoPackage file

I have a GeoPackage file that has been renamed, but the layer inside the GeoPackage keeps the original name, is it possible to automatically put the same name on the layer as the file? Example: ...
user avatar
  • 744
0 votes
0 answers
30 views

Save/convert geopackage to DWG

Is there a way to save data from a geopackage to a DXF/DWG without saving each layer to a DXF in the process and then stitching them together in CAD?
user avatar
  • 621
1 vote
1 answer
72 views

QGIS / QField wrong entry from value relation

I am absolutely puzzled what went wrong here: I am setting up a project in QGIS 3.16.11 which should be taken into field with QField 1.11 in order to collect data about the local situation concerning ...
user avatar
0 votes
0 answers
81 views

Shape integrity error

I'm working with a vector layer (from a geopackage) which I would like to convert to a raster layer. However, when I convert it certain parts just disappear. If I scroll through the attribute table ...
user avatar
  • 75
7 votes
1 answer
130 views

Is it possible to restrict using IDs already used on a different layer in QGIS?

I am working on a rather complex data model for a GIS-project in QGIS 3.16.3. The entire data model is stored in one single geopackage. Different layers are used to represent different geometry types ...
user avatar
  • 1,446
2 votes
0 answers
40 views

Batch embed SVG markers to geopackage

I have recently converted my QGIS project with more than 70 layers to a GeoPackage in order to be able to hand the project over to other persons and computers. The project includes over 100 SVG ...
user avatar
3 votes
0 answers
139 views

Unable to open Geopackage on QGIS : .gpkg is not a valid data source

I am trying to open two files, they are both coming from this source : [https://geoservices.ign.fr/rpg#telechargement][1] (Two first links that I downloaded through FileZilla). But once the unizpping ...
user avatar
  • 567
1 vote
0 answers
50 views

Importing and applying style stored in GeoPackage

I'm trying to use a GeoPackage to store a collection of styles - the idea is that each map sheet (it's a geological map) comes as a series of shapefiles, and of course each shapefile require its own ...
user avatar
  • 374
0 votes
0 answers
48 views

How can I change the geometry of a Geopackage

I have a Geopackage that has a geometry field geom. I updated the field successfully with SQL: SET geometry=MakePoint(555985,5755607,25832) But for some reason the geometry type is set to ...
user avatar
2 votes
0 answers
46 views

Get file path of Geopackage with PyQGIS [duplicate]

I want to get the Geopackage file path where my layer is stored in. Layer = QgsProject.instance().mapLayersByName('DAT')[0] print(Layer.source()) But this only gives me the path with layer pointer: /...
user avatar
  • 457
3 votes
1 answer
123 views

Change to field name of gpkg layer not retained using ogr

I am trying to update the names of the fields in a gpkg layer using the ogr Python package. I have gotten most of the way using this answer to another question on the subject using SetName on the ...
user avatar
  • 33
0 votes
0 answers
43 views

Can ArcGIS Desktop read label properties in geopackages created in QGIS?

Can ArcGIS Desktop read the labels, including the label placement and label formatting, in geopackages created in QGIS?
user avatar
  • 19
2 votes
0 answers
129 views

Create a empty geopackage with PyQGIS

I'm trying to create a new GeoPackage with an empty layer in it. I tried this code from this answer. from qgis.core import * from qgis.PyQt.QtCore import QVariant QgsApplication([], False) ...
user avatar
0 votes
0 answers
35 views

Adding new field to one attributes table based on the field on another attributes table in QGIS

I have two Geopackage layers on QGIS 3.22.2. One first one (LAST_ROUTES) shows the random extracted lines (routes) from the Istanbul highway map. Second one (LAST_POINTS) shows the points generated on ...
user avatar
2 votes
1 answer
93 views

SynchronizeFromQField just opens the QField project

I am using QField with QGIS. I don't understand the purpose of the tool Synchronize from QField. I successfully created a QGIS project with relative paths (with data from a geopackage), successfully ...
user avatar
  • 21
0 votes
0 answers
50 views

Storing Metadata in GeoPackage using GeoPandas or Fiona

I would like to store some metadata in a GeoPackage file. The metadata would be relevant to the entire file, not just to each individual geometry. An example might be assigning license text or ...
user avatar
2 votes
1 answer
45 views

Modifying Timestamps in QGIS

As it is seen in the picture, I have the attributes table which shows the random extracted routes from Istanbul highway map and points on it. Points are uniformly distributed through 2000 random ...
user avatar
3 votes
1 answer
70 views

What are the GeoPackage metadata conventions supported in GeoServer?

I'm trying to find information on how best to write metadata into a multilayer GeoPackage so that it can be read into a GeoServer instance. My chain of treatment would be to: Modify layers in an ...
user avatar
6 votes
1 answer
103 views

First added layer loses its symbology when adding the same layer twice but with different names using PYQGIS QgsProject.instance().layerTreeRoot()

I’m trying to insert the same layer from a GPKG several times to the same QGIS project. I’d like to give it different names first as well as symbology and filters afterwards. The code below works for ...
user avatar
  • 188
0 votes
1 answer
76 views

Copy a Geopackage to another folder using PYQGIS

I try to copy a GPKG to another folder. The result is the correct named copied GPKG but there is only one layer in the copy. It’s the layer with the same name as the GPKG. The other features (1x ...
user avatar
  • 188

1
2 3 4 5
10