Skip to main content

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
-1 votes
0 answers
9 views

cURL to Migrate and Publish GeoPackage to GeoServer [duplicate]

I've been using cURL to move a GeoPackage to GeoServer (v2.22.2) with hopes to use the same command to update the GeoPackage on a schedule. I'm seeing a couple of issues. The GeoPackage file on the ...
user1457123's user avatar
0 votes
0 answers
12 views

cURL to Migrate and Publish GeoPackage to GeoServer

I've been using cURL to move a GeoPackage to GeoServer (v2.22.2) with hopes to use the same command to update the GeoPackage on a schedule. I'm seeing a couple of issues. The GeoPackage file on the ...
user1457123's user avatar
0 votes
1 answer
47 views

Load results of split vector tool into group using PYQGIS

I try to write a script to automatically merge some input layers (all of the same structure) of a geopackage into one, afterwards split it by a specific attribute and save the output as geopackages to ...
Calidris's user avatar
0 votes
1 answer
37 views

Sublayer from a Geopackage file shows as geometrytype 0 (unknown), but it contains points. It doesn't show the points either. How do I fix this?

I have geopackage file that contains sublayers that containts points. I want to access the sublayer and create a new file of it. Despite the points it shows the geometry type as unknown. The points ...
user103858's user avatar
1 vote
1 answer
28 views

gpkg filename to add PostGIS table field

Is there a way in ogr2ogr to add gpkg filename to a PostGIS table existing field (filename)? during append? ogr2ogr -f "PostgreSQL" PG:"host='ip' port='port' user='user' dbname='db' ...
Tamas Kosa's user avatar
  • 1,509
1 vote
1 answer
51 views

Deleting GeoPackage vector layers and releasing open file handles with PyQGIS

On Windows 11 I have a PyQGIS script that creates layers from gpkg files. This all works perfectly fine. I want to delete these layers, recreate the gpkg files and reload them as layers again and this ...
John_nz's user avatar
  • 41
1 vote
1 answer
44 views

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

Using a Python script, I create a layer from a CSV file and then write it out to a gpkg file. I then create a group in the layer tree, load it in the gpkg file and add it as a child of the group. This ...
John_nz's user avatar
  • 41
1 vote
1 answer
52 views

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

Currently, to save a geopackage to Google Cloud storage I have to first create and save each layer locally. I would like to write it memory and the copy from memory to GCS. I'm stuck on the writing to ...
learningGeo's user avatar
1 vote
0 answers
52 views

QGIS unable to unzip file. Possible GPKG issue?

Having issues with QGIS 3.34 and 3.36 giving the error: Unable to Unzip File xxxxxx.qgz Often times these qgis files were made by the same user that was trying to open them again. This issue has been ...
Jesse Lawrence's user avatar
2 votes
1 answer
108 views

QGIS geopackage on shared network, project does not appear

I've created a geopackage containing a project, and i tried to share it on our local shared network so other users can access, but when we open the geopackage in another computer, the project does not ...
Camila's user avatar
  • 21
1 vote
0 answers
43 views

Creating One-to-Many relationships in Geopackages

The question is not new but still there is no clear answer. A very detailed expression of the question was given by nr_aus (https://gis.stackexchange.com/users/165549/nr-aus) at: Creating ...
mcfoi's user avatar
  • 174
1 vote
1 answer
36 views

URI for adding GeoPackage to ArcGIS Pro

I am trying to add a GeoPackage layer to current ArcGIS Pro 3.3 map using C# code. What should the syntax be for the URI? I have tried straight path: LayerFactory.Instance.CreateLayer("D:\...
narmaps's user avatar
  • 692
2 votes
1 answer
68 views

How to store relationships in geopackage with QGIS

How can I store relationship in GeoPackage with QGIS and how does it function? It is hard to find an example in the help program.
Valter Albino's user avatar
-1 votes
1 answer
54 views

Removing 0 and NULL columns in a geopackage [closed]

I have multiple geopackages with columns containing a mix of 0 and NULL fields. I want to remove these columns where there is no value above 0. I cannot do this manually as each geopackage has 90-100 ...
ashlaff's user avatar
  • 25
0 votes
2 answers
107 views

Open GeoPackage in spreadsheet with drag-n-drop

I would like to use GeoPackage as the default format for a project at work. The only issue is non-gis user prefer shapefile because they can drag-n-drop the .dbf in a spreadsheet and immediately use ...
MesanGeo's user avatar
0 votes
1 answer
48 views

Can a layer style be read-only or locked to a GeoPackage?

Can I "lock" a style to a layer in a GeoPackage file? In a QGIS project I can set a layer to be read-only from the Project Properties -> Data Sources. This makes the layer read-only. But ...
jeemil's user avatar
  • 21
0 votes
0 answers
78 views

How to work multiple users in the same geopackage using QGIS

I'm having a problem when multiple users have to access, manipulate or just view the same database. Sometimes the user needs to edit some information in the rows of the attribute table, or to change ...
Kledson Lemes's user avatar
0 votes
1 answer
47 views

How does Float32 in GeoPackage raster work

The more general question I'm asking myself is: What (raster) datatype should I use for a GIS-based game I am making in non-gis software: GeoTiff+GeoParquet or GeoPackage? The software (Godot) has ...
Fee's user avatar
  • 1,210
1 vote
0 answers
27 views

Retrieve GeoPackage QField iOS

I have created a QField project With a point layer to capture data and to store photos in a DCIM folder. The project is being used in iOS. The project was created using Qfield cloud. The project is ...
Nicolas's user avatar
  • 11
0 votes
1 answer
73 views

Extracting Coordinates of a 1x1 GRID in a gpkg file using QGIS

I have a gpkg file where I have the coordinates of the 1x1 km grid. See the below sample picture. I am trying to extract the coordinates (latitude & longitude) of all the 1x1 grid cells from my ...
LearningLogic's user avatar
0 votes
0 answers
29 views

QGIS - Feature total shown but no features in attribute table

wells is a geopackage, opened it this morning and the attribute table is empty. Anything I've done wrong or is the file somehow corrupted? Is there any way to go back to previous saves of a geopackage ...
zca4's user avatar
  • 13
4 votes
1 answer
88 views

QGIS can't create layers with DateTime with UTC data

I was creating a geopackage of points with a DateTime field, and the QGIS (version 3.32.3-Lima) seems to treat it as naive localtime data. Layer/CreateLayer/NewGeopackageLayer: Layer properties/...
Dave X's user avatar
  • 1,699
4 votes
2 answers
461 views

Calculating azimuth between two points using their projected coordinates with Python

First of all, the goal is to create small lines from points at each end of a LineString. However, for it a step is to calculate the azimuth for the first and second, and second last and last vertex. ...
i.i.k.'s user avatar
  • 1,753
0 votes
1 answer
227 views

QGIS unable to unzip the file [closed]

I'm editing this post because multiple users are having the issue in our organization. Using qgis 3.34LTR and 3.36, multiple people are reporting they can't open their qgis project files. They get an ...
フランス人's user avatar
4 votes
1 answer
204 views

How can I use ogr2ogr to left join a CSV to a GPKG file and produce a GeoJSON output in a scalable way?

I have a large GPKG and a CSV file, and I'd like to (left) join the CSV to the GPKG on one of the columns. A visualisation of what I'm trying to achieve: Reproducible example We can create an example ...
zabop's user avatar
  • 2,224
3 votes
1 answer
222 views

How to fix "failed to prepare SQL" error when creating GPKG file from OSM extracts using ogr2ogr?

I downloaded an OpenStreetMap extract for Europe, to a file latest.osm.pbf: curl https://ftp5.gwdg.de/pub/misc/openstreetmap/download.geofabrik.de/europe-latest.osm.pbf \ -o latest.osm.pbf I would ...
zabop's user avatar
  • 2,224
2 votes
1 answer
78 views

How to handle fiona._err.CPLE_AppDefinedError when using geofileops.makevalid on large files?

I am testing geofileops.makevalid. To do so, I create a GPKG file with a number invalid of geometries to fix. First, I create this Python script, test.py: import geofileops as gfo import geopandas as ...
zabop's user avatar
  • 2,224
2 votes
1 answer
62 views

Specify layer when using a geopackage in ogr2ogr

I want to clip a vector-layer by another layer with ogr2ogr as explained here. I always struggle to find out how to refer to a layer in ogr2ogr for input and output. Does anyone have a quick tip?
Lenn's user avatar
  • 1,297
0 votes
0 answers
65 views

How to prevent the creation of the field 'fid'

I'm creating some layers with PyQGIS, defining their fields and saving them in a GeoPackage file, but an unwanted field 'fid' is being created. How can I prevent this field from being created? This is ...
Aloísio Ângelo's user avatar
0 votes
1 answer
39 views

Read only the structure of a geopackage using GDAL/OGR?

I'm trying to figure out if it's possible to only show the structure (layer names, field names and types, constraints, etc) of a GeoPackage which has no data record using GDAL/OGR (ogrinfo). Is it ...
swiss_knight's user avatar
  • 10.5k
0 votes
1 answer
74 views

Automate GeoPackage opening

I created a GeoPackage file containing some layers and I'm trying to automate its opening, however a message box appears asking which layers should be added. I will attach an image. Is there a way to ...
Aloísio Ângelo's user avatar
1 vote
0 answers
57 views

QGIS - GeoPackage domains: edit & import/export [closed]

How can I a) edit existing domains from GeoPackage files in QGIS and b) export and import them, e.g. as CSV files? Is there a plugin for this?
Jörg Hippe's user avatar
0 votes
1 answer
45 views

How to create a QgsVectorLayer- object from layer of geopackage with pyQGIS?

I have ~ 4000 geopackages of which each comes with many layers. The goal is to be able to select two layers from each geopackage, merge them into one layer and export the merged layers as geopackage ...
i.i.k.'s user avatar
  • 1,753
5 votes
2 answers
194 views

How to write a GeometryCollection to a GPKG file and open it in QGIS?

I am trying to write a GeoDataFrame's GeometryCollection geometry to a GPKG file and open the result in QGIS. This is the way I create the GPKG file: import shapely import geopandas as gpd gpd....
zabop's user avatar
  • 2,224
0 votes
0 answers
63 views

QGIS append layer in one geopackage output of modeler

I would like to append new layer (created with model builder) to a new/existing geopackage in a batch processing. Tried with 3.36RC and 3.34.4 LTR. Every line is a csv converted to point Every line ...
john mega's user avatar
0 votes
0 answers
30 views

Create something similar to feature dataset in QGIS [duplicate]

I have data in the format of an ArcGIS feature dataset (hydrology data). I want to make similar to feature dataset in QGIS (create a feature dataset in GeoPackage). How can I do it?
Hadar Kravitz's user avatar
3 votes
2 answers
56 views

Let ogr/GDAL automatically choose Driver based on file extension

I inherited some code for a QGIS Python plugin which uses the ogr module. For each usage of ESRI Shapefiles is hardcoded due to the loading of the respective driver (ogr.GetDriverByName("ESRI ...
Honeybear's user avatar
  • 2,524
0 votes
1 answer
33 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
2 votes
1 answer
431 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
  • 21
0 votes
1 answer
56 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
25 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
57 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
67 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
141 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
0 votes
0 answers
51 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
80 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
4 votes
1 answer
124 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
  • 2,224
0 votes
0 answers
53 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
100 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
  • 74.8k
1 vote
1 answer
147 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
  • 2,224

1
2 3 4 5
13