Skip to content

[Bug]: Opening a GeoPackage leaves out rows with no geometry, without a notice #1675

Closed

Description

@flight1973

Before you start

  • I searched the existing issues and did not find a duplicate.
  • This is a bug report, not a usage question.

What happened?

Opening a GeoPackage leaves out rows whose geometry is NULL, and says nothing. A table of two rows, one with a polygon and one with no geometry, opens as a layer of one feature. The row and its attributes are gone, with no notice.

A GeoPackage table can hold a row without geometry, and RustGIS writes one: exporting a layer with a feature that has no geometry keeps that row in the file. So a round trip through GeoPackage quietly loses those features.

Steps to reproduce

nullgeom.geojson:

{"type":"FeatureCollection","features":[
{"type":"Feature","properties":{"name":"area"},"geometry":{"type":"Polygon","coordinates":[[[0,0],[1,0],[1,1],[0,0]]]}},
{"type":"Feature","properties":{"name":"none"},"geometry":null}]}
rustgis-cli run --data nullgeom.geojson --cmd 'share.exportLayer={"layer":"nullgeom","path":"n.gpkg"}'
sqlite3 n.gpkg 'SELECT name, geom IS NULL FROM nullgeom;'
rustgis-cli info n.gpkg

sqlite3 shows both rows (area|0 and none|1). rustgis-cli info reports the layer with "features": 1 and prints no warning.

Expected behavior

The row without geometry opens as a feature with no geometry, as it does from GeoJSON, or the reader says how many rows it left out.

How are you running RustGIS?

Command line (rustgis-cli)

Version

Checked with a build of #1572's branch, which doesn't change how GeoPackages are read.

Operating system, browser and graphics

macOS

Activity

  1. pick2510 commented on Nov 10, 2026

    @pick2510
    Contributor

    Fixed by #1673: GeoPackage rows without geometry are now kept, in both the desktop and the browser reader.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions