Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

2
votes
1answer
96 views

Open GPKG embedded layers in python

I have a gpkg with multiple tables, and I am trying to load it with geopandas: import geopandas as gpd filename = '~/example.gpkg' gdf = gpd.read_file(filename)' This returns the first table/layer ...
2
votes
1answer
22 views

How to export a unique ID field of a geopackage

When I am converting my geopackage file in shapefile, the unique ID field is not exported. I could duplicate it before exportation, but I wanted to know if it could be done in one step, in order not ...
0
votes
1answer
18 views

Can a Geopackage style be deleted through SQL window in DB Manager?

I am trying to clean up a Geopackage and as part of this I would like to delete some styles from the "layer_styles" table. I have tried doing this with the below query in the SQL window of the DB ...
1
vote
1answer
40 views

QGIS 3 Python Load all layer from geopackage

I am loading all layers from a geopackage in a QGIS 3 canvas in Python using a list with all layernames and the following code: databasepath = "X:/test.gpkg" layer = ["1","2","3","4"] for i in ...
0
votes
0answers
39 views

GeoServer Exception When Publishing A Layer Based On A Geopackage Store

I exported a map from MapTiler to a GeoPackage, and created a store in GeoServer for it. When I tried publishing the layer based on that store, I got the following exception: org.apache.wicket....
0
votes
0answers
18 views

OGR Python: Copying features from one datasource to another works with shapefile but not with geopackage

I have a shp/dbf EPSG4674 input datasource, and I want to copy features from one layer of this input datasource, create a new output datasource and write these features to that output datasource. As ...
1
vote
1answer
34 views

Are there limitations how many layers there should be in a geopackage?

Are there limitations how many layers there should be in a geopackage? It is advantageous to allocate layers into groups to several gqkg, instead of only one gqkg. (I work with approx. 50 layers.)
2
votes
2answers
57 views

GUI for managing GeoPackage (and other geodata forms)?

I know that the browser in QGIS has quite a bit of capability for managing GeoPackages and other geodata, but I was wondering if there was a lightweight, standalone tool similar to ArcCatalog?
3
votes
1answer
57 views

How to prevent gpkg size increase when I delete attributes?

I have a file, polygons.gpkg that I am using in QGIS. Its original file size is 48MB. When I do nothing except delete a handful of the attribute table's fields, I expect the file size to decrease. ...
1
vote
1answer
49 views

Geometry based automatic fill of fields in attribute table

I'm looking for solutions for auto-fill attribute table fields of spatial layer on QGIS from updates in geometry. All layers were created as polygon shapefiles. Attribute table fields are dependent ...
0
votes
1answer
30 views

How to maintain data types in QGIS when importing from PostGIS?

I have data stored in an AWS RDS PostgreSQL database with the PostGIS extension enabled. When I connect to the data from within QGIS (2.18.2) the data types are not preserved. For example a column of ...
0
votes
0answers
38 views

Clip all layers of a GeoPackage (GPKG) in one step

I would like to clip all layers of a GPKG-File to a given extend (canvas, mask layer, rectangle...) in one step. I could use clipping in batch mode but isn't there a nicer solution doing this in one ...
1
vote
1answer
90 views

Point disappears when zooming in - QGIS 3.4.1

I had a vector layer stored in GeoPackage format with a text field (lbl_text) that was being used to create labels on a map. After creating 3 points I decided it would be nice to rotate my labels, so ...
2
votes
1answer
61 views

How to use “Merge vector layers” in QGIS using Geopackages as output with FIDs duplicated

I'm using QGIS 3.2.3 in Windows and I created a tessellation with polygons (Voronoi tiling / Thiessen polygons) with the built-in tool "Voronoi Diagrams", (Call this layer LAYER1). Afterwards, I used ...
0
votes
2answers
62 views

Creating Custom Shapefile that can be snapped in location with no dragging using QGIS?

I am trying to create a custom shapefile consisted of 16 waypoints orientated around an origin point. the 16 waypoints are to be 2m apart from the central waypoint (like an axis, with 0 being the ...
2
votes
1answer
134 views

Query layer with leaflet-geopackage

I'm trying to find any documentation to help me understand and use the leaflet-geopackage plugin. what I want to do is use the full potential of the .gpkg file as a database and query only part of the ...
1
vote
1answer
60 views

how to change encoding of a geopackage in QGIS 3

For other formats you just go to Label >> Properties >> Source and there's a clickable button to select from a list of locales; but this box is grayed out for GPKG, is there a way to change the ...
0
votes
0answers
37 views

Does Geopackage field length affect performance?

I have moved away from shapefiles, and now store most of my desktop spatial data in a Geopackage. One of my fields is used to store research notes and is 'Type TEXT' with a character limit of 254. I ...
0
votes
1answer
106 views

How does QGIS 3.2.3 handle or create spatial indexes within a geopackage?

My frame of reference is: Does QGIS automatically use spatialite spatial indexes? This explain that QGIS uses QgsSpatiaLiteFeatureIterator for Spatialite Data Provider Spatial indexes in GeoPackage ...
3
votes
1answer
523 views

How do I write a GeoPandas dataframe into a single file (preferably JSON or GeoPackage)?

I'm new to GIS and having a basic beginner problem. I've got data in the form of a geopackage .gpkg from GADM.org. I can read in and use the data without problem using Geopandas (via built-in Fiona)....
0
votes
1answer
97 views

Storing metadata in Geopackage for QGIS?

Is there a way to store metadata in a Geopackage along with the layer data? I'm using QGIS 2.18.24. When you add or edit metadata via the "Metadata" pane of the layer's Properties, this is saved in ...
1
vote
1answer
53 views

Geopackages don't work on drive D:/

All of the Geopackages stored on one of my drives (D:/) appear to be corrupted, and don't work, but work fine if they are copied to another drive. The other file formats on the same drive all work ...
0
votes
1answer
67 views

Using ArcPy to produce lyr files pointing at geopackage?

I have hundreds of lyr files with a complex tree structure containing both layer groups and nested layers. What I would like to achieve is to grab each lyr files, iterate through every single layer (...
3
votes
1answer
68 views

Inserting tags (multi-values) in field of attribute table with QGIS?

I am setting up a QGIS project using a Geopackage (or shapefile) concerning the areas named with some historical toponyms and writing a brief description of them. In the attribute table I would like ...
0
votes
0answers
28 views

Analyze rasters in Geopackage?

Are the out-of-the-box geoprocessing tools in QGIS and ArcMap able to analyze rasters stored in a geopackage? Or do they need to be extracted to e.g. GeoTiff first? I'm thinking, for instance, of ...
1
vote
1answer
25 views

Storing geometry from a layer into a geopackage file with geotools plugin

How can I store a geometry to a geopackage file? FeatureIterator<SimpleFeature> fi = getLayer().getFeatureIterator((Envelope) null); GeoPackage geopkg = new GeoPackage(...); geopkg.init(); ...
0
votes
1answer
63 views

Geoserver generated Geopackage not displaying in maps

We have a geoserver instance with Geotiff layers created as layers and mosaics. When I query the geoserver to getMap as a png or image it displays the correct map data. When I change the output ...
1
vote
0answers
96 views

GeoServer GetMap with geopackage very slow (with high zoom levels)

I have a GeoServer instance and have imported multiple high res tiff files as layers and created a layergroup from the layers. When I call the WMS endpoint with a specified bbox and the geopackage ...
0
votes
0answers
109 views

QGIS does not seem to make use of spatial index when using GeoPackages

I have a QGIS project with several Geopackage-Layers. The project is quite slow in comparison to a project with shapefile or database layers. I started QGIS together with DebugView to find out what ...
1
vote
1answer
103 views

How do I insert rows into a spatial table within a geopackage file via a SQL INSERT statement?

I am attempting to insert rows into a spatial table within a geopackage file using DBeaver 5.1.1. I receive an error from the triggers, referencing functions that don't exist: ST_IsEmpty. Do I need ...
1
vote
0answers
99 views

Does GeoPackage support simultaneous editing?

I am looking to move a mess of shapefiles to a newer format, either Spatialite or Geopackage. I have read that Spatialite can handle multiple users editing the same file more or less simultaneously. ...
3
votes
0answers
82 views

Offline editing solution for small GIS project with multiple editors?

I have a specific use-case that I cannot seem to find any solutions for online, so any and all advice would be most welcome. Some basic details: I am part of a small academic organization (a research ...
1
vote
1answer
65 views

GeoServer and GeoPackage through WFS

Are there any options to download a GeoPackage from GeoServer through WFS service? I understand WFS output formats, but I can't find documentation about providing the GeoPackage format.
0
votes
0answers
65 views

Is it possible to work with GeoPackage or SpatiaLite files in command-line?

I am interested in processing GeoPackage files in CLI (probably in linux). I know for example I can use ogr2ogr with the -spat option to crop OSM *.pbf file and convert it to SpatiLite DB. But is it ...
1
vote
1answer
39 views

Adding per-row creation time and modification time in GeoPackage geometry table?

I need to add ctime and mtime to a GPKG sqlite database in table with geometry. Apparently logic solution: add ctime column with DEFAULT CURRENT_TIMESTAMP and add trigger ON UPDATE to set mtime = ...
6
votes
2answers
660 views

Uploading Geopackage contents to PostgreSQL

As a bit of background, we are looking to transition away from the use of shapefiles. We've already started using Geopackages for desktop work (QGIS / ArcGIS) but often have a requirement to upload ...
0
votes
1answer
173 views

QGIS 3.0: Naming layers for saving in GeoPackages programmatically

I have problems to save a vectorlayer at QGIS 3.0 with his original name in a GeoPackage. canvas = qgis.utils.iface.mapCanvas() layer = canvas.currentLayer() writer = QgsVectorFileWriter....
0
votes
1answer
74 views

Conditional plotting a geopackage

I have a geopackage for India taken from GADM. I can plot all the districts of India by using layer 1, all states using layer 3, and the whole country using layer 4. Here is the code: > library(...
0
votes
1answer
42 views

GDAL: Keep or reset CRS information in raster tiled GeoPackage

I have two contiguous raster files that I would like to include in a single GeoPackage file. The two rasters report to the same CRS: $ gdalinfo T001.tif Driver: GTiff/GeoTIFF Files: T001.tif Size is ...
1
vote
1answer
142 views

Get values from non spatial table in geopackage via Python to compalist

I need to get values from non spatial table in geopackage via Python. Do You have any ideas how to get this? I'm trying get this using spatialite3 library and simple string select query but I have ...
0
votes
0answers
78 views

Exported GeoPackage from R not drawing in ArcMap

I am trying to export multiple layers of point data from R as a single GeoPackage. The code works fine (included below), however when I try and load the resulting GeoPackage into ArcMap (10.6) I get ...
2
votes
0answers
63 views

GeoServer doesn't recognize imagery in GeoPackage

I'm currently trying to upload a GeoPackage containing raster images to a GeoServer (v2.13) instance with the GeoPackage extension. The file contains ~425 layers but after I add the file to the server'...
3
votes
0answers
65 views

Why won't Categorized renderer see GeoPackage attributes/values?

I've encountered a problem with the Categorized renderer in QGIS. I have a GeoPackage file including a set of data points, with approximately 30 attributes (mainly strings). I'm trying to set the ...
2
votes
1answer
80 views

Counting the number of layers in a GeoPackage

I'm trying to figure out a best practice for determining what are the names of layers in a GeoPackage and counting the total number of them. I've been able to list all the layers of a GeoPackage ...
0
votes
0answers
127 views

QGIS 3 - load point layer from Geopackage doesn't render points

I am trying to load a point layer in QGIS (3.0.2) using DB Manager. I have a non-spatial table, which I imported to the Geopackage from CSV (and needed to implement the .csvt approach to import the ...
1
vote
1answer
113 views

Packing tiled rasters into a Geopackage in QGIS 3.0.3 whilst maintaining the colour

I have a folder containing 79 tiled Geotiff rasters making up a basemap of the UK. My goal is to efficiently store these in a Geopackage which already contains some vector data also used for base ...
1
vote
1answer
178 views

Is there a way to add a Geopackage in QGIS 2.18.20 like QGIS 3?

Is there a way to add a Geopackage into QGIS 2.18.20 that is similar to the approach taken in QGIS 3? The below is a screen grab from QGIS 3.0.3 When I drag and drop into QGIS 2.18.20 it gives me ...
3
votes
2answers
651 views

Add layers to GeoPackage using PyQGIS (QGIS 3)

How to add layers (vector or raster to an existing GeoPackage)? While loading an existing layer of a GeoPackage is quite trivial: path = '/home/matteo/geopackage.gpkg|layername={}'.format('admin') ...
0
votes
2answers
221 views

Saving duplicate geometry layers into a geopackage?

I have a bunch of variables to map with same geometry (Regional Boundaries), and wanted to create separate layers with differing attributes within a single geopackage file for ease of file management. ...
1
vote
0answers
126 views

gdal_translate fails to add raster to existing vector geopackage

I have an existing GeoPackage soils.gpkg with a single vector feature set. I am attempting to use Gdal to add a tiff raster to the GeoPackage; however, it fails in the following way: C:\Users\Me\...