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 vote
2 answers
38 views

Geometry not transferring between data sets with PyQGIS

I am working on a QGIS plugin. The database for the plugin is a GeoPackage. Part of the plugin includes the ability to import features from outside databases by clicking a button. The problem I am ...
2 votes
1 answer
53 views

Can't query GeoPackage geometry via SQLite client

I have a GeoPackage and I want to select the geometry as text from the SQLite command-line client. Here's what I've done: Run sqlite3 Load SpatiaLite with .load /path/to/mod_spatialite.dylib (I'm on ...
  • 1,183
0 votes
0 answers
59 views

QGIS : Problem in importing geopackage that was created from a .dwg file

I have an AutoCAD .dwg file of stream/channels and hydraulic engineering data. I want to use it in QGIS (3.22.14-Białowieża) for some geoprocessing tasks. The steps I want to take are: Convert the *....
4 votes
1 answer
62 views

Adding different types of geometry to layer in QGIS

How can I combine points and lines in a layer? Currently, I'm using a GeoPackage layer but when creating this new layer you need to define what geometry type you want to use. So is it not possible to ...
  • 141
1 vote
0 answers
39 views

Show geometry column on attribute table in QGIS from Geopackage

Id would like the ability to show the geometry column on the attribute table in QGIS, when the data source is a Geopackage. The context is that, im going to be entering geometry-less records as ...
  • 3,105
0 votes
0 answers
33 views

Geopackage geometry type confusion

I have a problem with multipolygon layer stored in geopackage. In QGIS 3.22, $area function simply dint't work for some features in field calculator and leaved null values. So I decided to convert ...
  • 105
2 votes
1 answer
40 views

Import an entire geopackage into PostGIS via DB Manager

I am trying to important an entire geopackage to a PostGIS database via the Import Layer/File button in DB Manager. However when I do this only one of the layers in the geopackage gets successfully ...
2 votes
1 answer
47 views

PyQGIS load a geopackage layer into memory

I am developing a QGIS plugin. Part of the plugin generates some memory layers that the user interacts with. When the user is done with the project session, there is a button to save the memory ...
0 votes
1 answer
33 views

Converting geodatabase into Geopackage in FME

I have never used FME and need to convert some geodatabase files into Geopackages. So the data can be stored in a GeoServer and published online.
  • 131
1 vote
1 answer
66 views

ST_Intersects support in GeoPackage

I generated a new GeoPackage with GDAL: ogr2ogr -f GPKG my.gpkg my.geojson I can open the GPKG in QGIS and all of the data is there, but when I open a SQLite client and run a spatial query, for ...
  • 1,183
0 votes
0 answers
39 views

Clipping raster data from a .gpkg file with multi polygon extents

Can you clip raster data to polygon extents created in a .gpkg file in QGIS? I've mapped tree canopies and would like to get raster derived values such as max height of trees using DSM data, and other ...
0 votes
1 answer
34 views

Reduce the region of a GPKG dataset in R

I downloaded a GPKG file (from humdata.org), with the population density (H3 Hexagons) of a country; the content of the dataset is the following: fid [integer]: record order in data upload h3 [...
1 vote
1 answer
45 views

Delete GeoPackage layer using SQL

How do you delete a GeoPackage layer using plain SQL? I tried drop table my_layer and it deletes the table, but leaves behind the spatial index and other metadata.
  • 1,183
1 vote
0 answers
38 views

Create a new GeoPackage with GeoPackage JS

I'm trying to use GeoPackage JS to create a new GeoPackage on disk. I haven't been able to find any examples in the docs for how to do this. I did find a method GeoPackageAPI.create() which I tried: ...
  • 1,183
1 vote
0 answers
46 views

Importing downloaded GeoPackage file into QGIS

I have downloaded a zip file with several distribution data of species around the world. I extracted it and now I have just one file (.gpkg file). I am trying to import it in QGIS 3.10 but when I open ...
  • 11
5 votes
3 answers
311 views

Permanently sorting table so that field of interest is sorted in the same order as the fid in QGIS

Using 3.22.13, consider a non-spatial GeoPackage attribute table containing one text field, named "field_a". This table has the following form: fid field_a 1  B 2  A 3  X 4  C How can I sort ...
  • 7,210
1 vote
0 answers
44 views

GeoPackage (GPKG) with custom style and spatial area

With Qgis 3, with the tool available in "Processing" "Layer packaging", package layers within a GeoPackage database by saving the style. But unless I am wrong, it does not allow to ...
  • 839
2 votes
0 answers
49 views

Sequential drawing of lines and points

It is required to draw different geometry types alternately. Like this: point - line - point - line - point - ... Is there any way in QGIS that provides users with such features: drawing objects of ...
0 votes
1 answer
62 views

Are there limitations on the size of a feature in a geopackage?

I have a big MULTIPOLYGON feature that I can manipulate in sf, but when I try to save it in a Geopackage file from sf I get the message: Failed to create feature 0 in T_POLIGONOS_HILUCS and then an ...
0 votes
0 answers
14 views

Database lock on simple actions on Geopackages in QGIS3

I saw similar posts, but my problem is "worst"... The geopackage locks even on very simple operations, on a single layer. I can't pinpoint specifically what triggers it: sometimes, I can ...
  • 487
2 votes
0 answers
21 views

Exporting curved geometries as a GPKG with linear geometries

I have a layer (based on PostGIS or GPKG) containing complex, curved geometries (think MultiSurface(CurvePolygon(CompoundCurve(CircularString(...). How can I export this layer as a new GeoPackage that ...
  • 9,848
0 votes
0 answers
47 views

GeoPandas .to_file() writes empty geopackage file

I'm trying to write a GeoDataFrame as a GeoPackage using the .to_file() method. My code runs without issue; however, often times the GeoPackage created is empty (ie it is 0 KB). While the code runs ...
  • 88
2 votes
1 answer
145 views

I deleted 95% of features in a gpkg file, using QGIS, but the file size remains the same [duplicate]

I downloaded a file with all the roads in Denmark. The gpkg file was 447MB. My project only concerns a small region, so I used QGIS to delete most of the features, so that only less than 5% of the ...
1 vote
1 answer
55 views

How to create a spatial index in a GeoPackage with GeoTools?

I want to write a GeoPackage file with GeoTools and create a spatial index in the end. After consulting the documentation and also the implementation I still can not figure out a way to do this using ...
  • 303
2 votes
1 answer
66 views

Bulk writing to GeoPackage with GeoTools

I have a hard time figuring out how to write features to a geopackage file with geotools without committing after adding each feature (which makes the writing process unbearably slow). What I would ...
  • 303
3 votes
3 answers
129 views

Finding the name of the geometry column for GeoPackage QgsVectorLayers

I have a QgsVectorLayer whose data source is a vector GeoPackage file. How can I find the name of its geometry column? It is possible to use ogr to get it but I am looking for a native PyQGIS approach ...
  • 9,848
0 votes
1 answer
33 views

PyQGIS data provider connecting to wrong table

I have an issue with PyQGIS somehow connecting to the incorrect table and using the wrong tables. I have a geopackage, which I'm connecting to via filepath. When I report on the number of features, or ...
  • 3,105
0 votes
2 answers
59 views

Writing empty table in a Geopackage of a certain geometry type using sf

I'd like to create an empty table (i.e.: no rows) in Geopackage but with a specific geometry type (i.e.: polygons). The following code creates a simple feature collection with 0 features and 0 fields, ...
0 votes
1 answer
48 views

Reassigning all layers in gpkg and output as new one using PyQGIS

I'm trying to reassign crs when writing snippets to do as described, combining with pre-existing Python code. I couldn't find the way to append to gpkg without saving the file onto local storage and ...
  • 159
2 votes
1 answer
154 views

Export a GDB feature class to a GPKG with OGR

Suppose I have a feature class in a GDB here: C:\MyDir\MyGDB.gdb\my_dataset\my_feature. I want to export this feature class to a geopackage here: C:\MyDir\MyGPKP.gpkg using the gdal vector tool ...
  • 1,801
2 votes
0 answers
38 views

Qgis saving layers to geopackage

I set up a geopackage to "hold" all the reused resources so that it could be portable with custom styling (as I was led to believe) Today I found out that dragging & dropping layers ...
  • 21
0 votes
1 answer
51 views

Using GDAL/OGR to remove a specific layer from a geopackage

Is there any way to remove some layers from geopackage instead of creating new geopackage with only layers I need. Example:- I have a geopackage containing: Bars (Point) Bars_reprojected (Point) ...
1 vote
0 answers
64 views

QGIS won't open ANY shapefile or geopackage

Running a clean install of QGIS 3.22.10 on a Lenovo laptop running Windows 10. I cannot open any shapefile. Every time I try to open one I get the following error message: Invalid Data Source: xxx.shp ...
  • 19
0 votes
1 answer
68 views

Using multiple geopackage vector layers in modeler

I reproduce a project with the qgis graphic modeler, as it turns out some steps needed to be repeated in the future, maybe by less experienced GIS users and also for documentation purposes. However on ...
  • 53
0 votes
1 answer
100 views

Command line tool to convert vector GPKG to PNG

I have around 30,000 vector .gpkg files that I'd like to convert each to a .png or .jpg file. Is there any command line tool that does this? I tried GDAL but it did not work: $ gdal_translate ...
  • 129
8 votes
1 answer
282 views

Can I start QGIS with a project from a GeoPackage?

I can save a QGIS project within a GeoPackage, which is nice since it can include the data too. But can I start QGIS (from the command line, or otherwise on GUI systems) such that it gets the project ...
  • 56.9k
1 vote
0 answers
37 views

QGIS 3.10 problem with uploading Geopackage uploaded vector layers shown displaced

I am trying to upload a Geopackage file containing various vector layers into my project (currently using QGIS 3.10). Uploaded layers are shown as if they were displaced on the base map of Google ...
1 vote
0 answers
80 views

Add image/photo as Blob to a geopandas dataframe and then save to a geopackage *.gpkg

Trying to switch from doing this through spatialite, and fully containing it within geopandas. I have a file with the image's file locations in it, and loop through them all. Open each image and add ...
  • 161
2 votes
1 answer
95 views

Properly closing GeoPackage after opening by OGR so as to delete it later

I am creating a program that downloads a GeoPackage from online, opens it, makes a copy of the first layer as a shapefile, and then (hopefully) deletes the GeoPackage. However, I'm not able to delete ...
  • 720
3 votes
1 answer
118 views

Opening QGIS project says layers not available

I created a QGIS project with four geopackage layers for an uni project. I made sure to include all four geopackage layers in the same folder as the QGIS project and then zipped it to send it to my ...
  • 31
0 votes
1 answer
79 views

Create view and display in QGIS of a spatial table in geopackage or SpatiaLite

I need to create 4 views of a spatial table in a geopackage or SpatiaLite (no preference at the moment). I tried with geopackage, but the view is displayed as a datatable and not displayed as a layer ...
  • 493
2 votes
2 answers
62 views

Incorrect geopackage field type when exporting via GeoServer

When downloading geopackages via GeoServer from the data provider datamap.gov.wales (e.g. this one) I get a geopackage containing the designation_date field, which is marked as TIMESTAMP. The raw WFS ...
  • 6,586
1 vote
0 answers
94 views

Unable to import raster into geopackage in QGIS

Whenever I try to import a raster layer in the form of a geotiff into a geopackage in QGIS I just end up getting a black area with no values. Am I not importing the raster properly or do geopackages ...
1 vote
0 answers
23 views

Issue with geopackage syncing - geometries not populating in QGIS after sync (Qfield 2.2.1/QGIS 3.22.4)

I have a geopackage I have created and followed all steps I did last time I used QField--when packaged for offline editing, the geopackage from QGIS gets changed from "test" to "data&...
0 votes
0 answers
39 views

QGIS adds layer to GEOPACKAGE layer but displays "could not find layer"

I have noticed something strange when merging layers (not matching attribute tables) together. When I try this QGIS responses 'Export in vector data failed. Could not find layer.' So far so bad. When ...
  • 509
0 votes
1 answer
112 views

QGIS/GDAL Python- Export WMTS to geopackage raster, only for set extent and resolution

The problem: I need to export imagery from a WMTS or XYZ webtile source for a variety of geographically dispersed areas. It will be used in Qfield, so needs to exported as a geopackage raster. In ...
  • 340
2 votes
0 answers
85 views

Newly created multipolygon layer fails to save due to large file size

I used the function "Join attributes by location" to join a number of polygon circles (a multipoylgon layer) with the values of the points (multipoint layer) that are "contained" ...
  • 51
1 vote
1 answer
90 views

Create Spatial Index from geopackage not working

I downloaded BGT data from https://www.pdok.nl/introductie/-/article/basisregistratie-grootschalige-topografie-bgt- in QGIS 3.24.2-Tisler. I can't clip this data and get a message: 'no spatial index ...
0 votes
1 answer
48 views

Avoiding malformed images serving raster data from GeoServer with a Geopackage store

I'm attempting to use the Geopackage format to serve raster data in GeoServer 2.21.0 (OpenJDK 11 on Ubuntu) and am getting odd results when using layer preview or WMS GetMap to view the data. (Since I ...
  • 101
1 vote
1 answer
69 views

Correct syntax for filtering of geopackages (SQL)

I already asked about this topic, but I am still struggling. I created a geopackage with railways of Germany. I need to filter some sections out. I understand that geopackages work with SQL syntax for ...
  • 509

1
2 3 4 5
11