Skip to content

Releases

0.14.4

Choose a tag to compare

@urschrei urschrei released this 10 Nov 17:02
8313418

This release changes the QGIS plugin and its plugin repository. The crates'
code is the same as in 0.14.3.

Changed

  • The QGIS plugin's Plugins → GeoPackage Toolkit menu lists every
    Processing algorithm, in the toolbox's groups. It listed only the four in
    Inspect and repair, so the coverage algorithms and Export layer to
    GeoPackage
    were only in the toolbox. When the geopackage_rs module
    does not load, the menu has no entries: no algorithm is registered then.

Fixed

  • The QGIS plugin repository gave the plugin's file_name as the release
    asset's name, gpkg_toolkit-0.14.3.zip. QGIS takes a plugin's id from
    that name, up to its first dot, so it read the id as gpkg_toolkit-0. An
    install from the repository then failed with "Could not store plugin to
    the plugin directory", and an installed plugin was shown as available
    only locally. file_name is now gpkg_toolkit.<version>.zip, as
    plugins.qgis.org names it.

QGIS plugin 0.15.0

Choose a tag to compare

@urschrei urschrei released this 10 Nov 21:44
10a0cf9

Changed

  • The plugin has its own releases, separate from the crates'. Its version
    continues from 0.14.4.
  • The Processing provider's name gives the plugin's version, such as
    GeoPackage Toolkit 0.15.0.
  • The menu entries, algorithm help, parameter labels and messages are
    rewritten for QGIS users. Check coverage samples (Requirement 21) is now
    Find NaN and infinite values in coverages; its identifier,
    checkcoveragesamples, is unchanged. Add GeoPackage layer (geopackage
    crate)
    is now Add GeoPackage layer with this plugin. The data
    provider's description is GeoPackage (GeoPackage Toolkit). In the report
    of Repair spatial indexes, the action for a replaced trigger set is
    rebuilt with 1.4 triggers.
  • The data provider says why it cannot open a source that names no layer:
    the file has no layers or tables, or it has more than one and the source
    must add |layername=<name>.

0.14.3

Choose a tag to compare

@urschrei urschrei released this 09 Nov 14:58
16070dc

This release publishes the QGIS plugin through a plugin repository and
documents it in the book. The crates' code is the same as in 0.14.2.

Added

  • scripts/qgis_versions.py reports QGIS 4 minor versions that the native
    provider has no build for, with the matrix entries each needs: the release
    tag, and the name and SHA-256 of OSGeo4W's qgis-devel archive. A monthly
    workflow, qgis-versions.yml, runs it and opens an issue for each.
  • A QGIS plugin repository, https://urschrei.github.io/geopackage/qgis/plugins.xml,
    from which QGIS installs and updates the GeoPackage Toolkit plugin. The
    book's site serves it, and scripts/plugins_xml.py writes it from the
    newest release's plugin zip after each release.
  • The book has a guide to installing the QGIS plugin and adding a layer
    through it, and a reference page for its algorithms and data provider.
  • The plugin has a LICENSE file, with both licence texts beside it in the
    release zip, and an icon. Its about text names the compiled parts it
    holds and the platforms they are built for.

0.14.2

Choose a tag to compare

@urschrei urschrei released this 09 Nov 14:23
867ce86

This release changes the QGIS plugin's native provider and its release
builds. The crates' code is the same as in 0.14.1.

Added

  • The QGIS plugin ships the native provider for QGIS 4.0 on Windows. The
    Windows builds for QGIS 4.0 and 4.2 link the qgis_core.lib of OSGeo4W's
    qgis-devel package for the same release.

Changed

  • The QGIS native provider keeps reader threads for each layer. Each holds a
    read-only connection and the layer resolved on it, so a read no longer
    starts a thread or resolves the layer again, which the crate's handles
    benchmark puts at 37 to 51 µs, more than a small read itself.

0.14.1

Choose a tag to compare

@urschrei urschrei released this 09 Nov 13:06
f83a624

This release changes the QGIS plugin and the scripts that build it. The
crates' code is the same as in 0.14.0.

Added

  • scripts/dev_qgis_plugin.py builds geopackage_rs and the native provider
    into the repository's copy of the QGIS plugin, for a QGIS profile that
    links to it. The plugin's startup message names the provider library it
    loaded and the revision the script built each part from.

Fixed

  • On Linux and macOS, the QGIS plugin's module and native provider link the
    SQLite that QGIS has loaded, instead of a copy of their own. Two copies in
    one process do not see each other's locks, and closing a file in one
    releases the locks that the other holds on it. So the plugin could write to
    a file while QGIS, through GDAL, was writing to it. scripts/host_sqlite.py
    gives the settings for these builds and checks the result. The plugin's
    Linux module now needs glibc 2.28, as the native provider does.
  • The QGIS plugin's version follows the workspace's: the 0.14.0 release
    attached its plugin as gpkg_toolkit-0.13.0.zip.
    scripts/package_qgis_plugin.py now refuses a plugin version that differs
    from the workspace's.

0.14.0

Choose a tag to compare

@urschrei urschrei released this 09 Nov 00:48
8c530ee

Added

  • curve::to_iso_wkb returns a WKB body with every type code in ISO form, at
    every nesting depth: a code that gives Z or M by a high-bit flag becomes
    the ISO code for the same type and dimensions. Coordinates and byte order
    are copied unchanged.

  • Layer::repair_wkb_type_codes rewrites each geometry whose type codes use
    the high-bit flags with ISO codes, keeping its coordinates and SRS id and
    adding a header envelope, in one transaction. It returns how many it
    rewrote, writes nothing when there is nothing to rewrite, and leaves a
    geometry it cannot read alone. The NonIsoWkbTypeCode finding now names
    it as the repair.

  • Layer::repair_datetimes rewrites DATETIME text that only the lenient
    parser reads, such as 2017-08-01T00:00:00.0Z, in the GeoPackage form
    YYYY-MM-DDTHH:MM:SS.SSSZ, when nothing is lost: a numeric UTC offset
    becomes Z for the same instant, and a value with a sub-millisecond part
    is left alone. validate reports such text as the new
    NonStandardDateTime warning, per table, naming that repair.

  • gpkg repair also runs both repairs: on every feature layer and, for
    DATETIME text, on every attribute table, or on one named table. It
    reports how many values each rewrote.

  • geopackage-py, Python bindings built with PyO3 as abi3 wheels for CPython
    3.9 and later, with SQLite vendored. They cover open and create, layer
    schemas, streaming feature reads by bounding box, WHERE clause and column
    projection (one reader thread and connection per read), batched inserts,
    updates and deletes with ISO WKB geometry, validate, spatial index audit
    and repair, the extension catalogue, SRS rows, and tiled gridded coverages
    with value lookups, per-tile statistics and the Requirement 21 check. The
    tests are pytest, run in CI on three OSes.

  • qgis-plugin/gpkg_toolkit, a QGIS Processing plugin over geopackage-py
    with seven algorithms: validate, repair spatial indexes, list extensions,
    sample a coverage at points, coverage tile statistics, the Requirement 21
    check, and layer export. It supports QGIS 3.28 to 4.x. Its tests run
    headless in CI. scripts/package_qgis_plugin.py and the qgis-plugin
    workflow build one zip with the native module for each platform.

  • The QGIS plugin registers a vector data provider, geopackage_rs, that
    reads and edits GeoPackage layers through geopackage-py in place of OGR,
    with OGR's URI form. Bounding-box requests use the RTree, subset strings
    are SQLite WHERE clauses, attribute subsets and no-geometry requests are
    column projections, and edit sessions add, delete and change features.
    Field changes are not offered, since the crate has no schema changes. Its
    tests compare it feature by feature with OGR on GDAL-written fixtures,
    commit an edit session and check the result with the crate and with OGR,
    render a map on worker threads, and save and reopen a project with a
    relative path.

  • geopackage-qgis, a native build of that provider for QGIS 4: Rust over
    the crate's Arrow reads, behind a C++ shim that subclasses QGIS's provider
    classes through cxx. On 200,000 points it reads in a half to a third of
    OGR's time, where the Python provider takes three to four times OGR's. It
    edits as the Python provider does, each edit call in one transaction. The
    plugin loads it, under the same geopackage_rs key, when it ships a build
    for the running QGIS minor version, and otherwise falls back to the
    Python provider. On Linux and macOS a build needs QGIS's and Qt's headers
    only, taking their symbols from the QGIS it loads into, so it serves any
    patch release of its QGIS minor version. scripts/qgis_headers.py makes
    those headers from QGIS's source, for a QGIS without them, such as the
    macOS app. The provider tests run against both providers, the native one
    in a new CI job on Linux, macOS and Windows with QGIS 4.2 from
    conda-forge. The plugin zip carries native builds for QGIS 4.0 and 4.2 on
    Linux (x86_64 and aarch64, glibc 2.28 or later), macOS (universal2) and
    Windows (4.2 only).

  • geopackage_core::triggers::missing_triggers returns the 1.4 suffixes of
    the trigger jobs that a set of trigger names leaves undone. Its result is
    empty for a complete set.

Changed

  • curve::BodyScan has a new public field, flagged_type_code (see
    Fixed). Code that builds a BodyScan with a struct literal must set it.

  • Layer::read_arrow_in and read_arrow_in_where read a box that selects
    every row as read_arrow and read_arrow_where do, with their threads and
    aggregate path, instead of walking every RTree candidate. A box selects
    every row when it holds the bounds of the layer's spatial index, widened by
    one f32 step, and every row has an index entry (no NULL or empty
    geometries). The widening is needed because the RTree module stores a
    subnormal coordinate as the nearest f32, which can be inside the true one;
    so a box exactly equal to the index bounds still filters. This is the
    request a map canvas makes when zoomed out to the whole layer. On the
    scattered group of the filtered benchmark, a box over all 200,000
    points takes 28 ms instead of 119 ms. A smaller box pays for one read of
    the RTree's root node, about 4 µs.

  • The workspace requires arrow-array 60.1. geopackage-ffi uses
    RecordBatchStreamReader, the new name of ffi_stream::ArrowArrayStreamReader,
    which 60.1 deprecates and which CI's -D warnings rejects.

  • TileAncillary's min, max, mean and std_dev fields, and the
    writer and builder documentation, now give their units: values after the
    tile's and the coverage's scale and offset, not stored samples. The field
    documentation used to say "sample", which was the misreading the CLI made.

Fixed

  • The WKB scanner that computes envelopes rejected a type code that gives Z
    or M by a high-bit flag (0x8000_0000, 0x4000_0000, as in OGC 99-402)
    instead of the ISO offset. Some writers put such codes in GeoPackage
    bodies; one Esri export has ISO MULTIPOLYGON Z containers whose polygons
    are 0x80000003. GDAL reads them, and so did this crate's wkb-crate read
    path, but the scanner's rejection made audit_spatial_index, the index
    rebuild and validate fail on the whole file. The scanner now reads the
    Z and M flags and reports the first flagged code in the new
    BodyScan::flagged_type_code. It still rejects the EWKB SRID flag and a
    code with both a flag and an ISO offset. encode_gpb_from_wkb still
    refuses to write a flagged body, so the crate writes only ISO WKB.

  • GeoPackage::validate stopped with an error at the first geometry it could
    not read, so one bad row hid every other finding in the file. It now reads
    the header and walks the body of every geometry once, and reports two new
    findings per layer: UnreadableGeometry (an error, with the count and the
    first reason), and NonIsoWkbTypeCode (a warning, with the count and the
    first code) for the high-bit flags above. A layer with an unreadable
    geometry is not audited, since the audit reads the same geometries. The
    extra pass makes validate read every geometry, where before only the
    index audit read the feature tables.

  • Layer::read_arrow_in and read_arrow_in_where were slow on spatially
    scattered data, the usual case. They walked the RTree's candidates as runs
    of consecutive keys, with one query per run, and scattered rows make nearly
    every candidate its own run. A box selecting 1% of 200,000 scattered points
    issued about 2,000 queries and took 4.9 times as long as features_in. The
    candidates are now read a page at a time: a page whose ids fill at least
    half its key span is read as a range, as before, and a sparser one by its
    explicit ids, bound through rusqlite's rarray. On the new scattered
    group of the filtered benchmark, that box now takes 3.6 ms instead of
    17.6 ms (the row path takes 3.4 ms), and a 10% box takes 24 ms instead of
    73 ms. Clustered data is unaffected: its candidates were already ranges.
    Every connection the crate opens now registers rarray, which needs
    rusqlite's array feature.

  • A spatial index that had lost some of its triggers was reported as
    SpatialIndexStatus::Current (or Legacy), because the status was decided
    from which trigger names were present, and any one of update5, update6
    or update7 passed for the whole 1.4 set. has_spatial_index then
    answered true, so features_in, the Arrow bbox reads and the bulk-write
    decision used an index that writes were getting past: after dropping only
    the insert trigger, a bounding-box query missed every row inserted since.
    repair_spatial_index and gpkg repair did nothing to it, and validate
    was silent until the index had drifted. Such an index is now
    SpatialIndexStatus::Stale. Reads fall back to a full scan, validate
    reports StaleSpatialIndex straight away, and repair reinstalls the whole
    set and rebuilds the content. A missing trigger can also make writes fail:
    without update2, an emptied geometry keeps its entry, and a later update
    back to a non-empty geometry hits update7's UNIQUE id.

    • has_spatial_index, repair_spatial_index and rebuild_spatial_index
      now decide from spatial_index_status, so they cannot disagree with it.
    • A large write_all into such a layer now takes the per-row path, as it
      already did for a stale index with no triggers. It used to take the bulk
      path, which reinstalled the whole trigger set as a side effect. Repair
      is never automatic, so the index stays stale until you repair it.
    • Completeness is by role, not exact name. A complete pre-1.4 set
      (insert, update1 to update4, delete) is still Legacy, and so is
      a complete mixed set. Trigger bodies are not inspected. A trigger with the
      right name and the wrong body passes, and audit_spatial_index finds the
      drift it ...
Read more

0.13.0

Choose a tag to compare

@urschrei urschrei released this 18 Oct 12:34
fb30cd6

Added

  • GeoPackage::validate reports coverage tiles whose pixel size is not the
    one their zoom level declares as Finding::CoverageTileSizeMismatch, an
    error: GDAL refuses such a tile, as do this crate's sample reads. It reads
    only the header, so it does not need the coverage-samples feature.
  • The coverage-samples feature, off by default, decodes the samples of
    tiled gridded coverage tiles with the tiff and png crates. The feature
    is on geopackage-core, which holds the decode, and geopackage forwards
    it. Image tiles are still never decoded.
    • In geopackage-core::coverage: decode_samples and decode_payload
      return a tile's TileSamples, whose check_finite checks Requirement
      21 and whose statistics calculates SampleStatistics. SampleLookup
      finds the WeightedSamples a position reads and combines their values,
      so a reader without SQLite can look up values too.
    • A small payload whose header declares a huge tile cannot make the
      decoder allocate for it. Where the zoom level is known, a tile whose size
      is not the level's is refused from its header before it is decoded, as
      GDAL does (TileError::PayloadSizeMismatch). Every decode
      also has a limit, DEFAULT_MAX_DECODED_SAMPLES (4096 by 4096) unless
      OpenOptions::max_decoded_samples or decode_payload's argument sets
      another, over which it returns the new TileError::PayloadTooLarge.
    • CoveragePayload::tile_payload, to check a coverage payload's size with
      TileMatrix::check_payload.
    • Coverage::decode and Coverage::samples return a tile's stored
      samples as TileSamples. samples refuses a tile whose size is not its
      zoom level's.
    • Coverage::value_at returns the value at a position in the coverage's
      CRS, with Interpolation::Nearest or Interpolation::Bilinear, following
      its grid_cell_encoding. Coverage::sampler opens a CoverageSampler,
      which keeps decoded tiles across lookups.
    • Coverage::statistics calculates a tile's SampleStatistics, and
      CoverageWriter::put_with_statistics records them on write. Both match
      the statistics GDAL records: of values after the scale and offset,
      without data_null, with the population standard deviation.
    • Coverage::check_samples checks Requirement 21 (no NaN or infinite
      samples), and put_with_statistics enforces it.

Changed

  • With the coverage-samples feature, GeoPackage::validate decodes every
    coverage tile and reports a NaN or infinite sample as
    Finding::CoveragePayloadNonConformant with requirement 21, and data that
    does not decode with requirement 15 (TIFF) or 13 (PNG). A tile whose size
    is not its zoom level's, or that is over the decode limit, is not decoded,
    and its samples are not checked. Without the feature it does not change.
  • CoverageAncillary and TileAncillary move to geopackage-core::coverage,
    and geopackage re-exports them under the same names. CoverageAncillary
    gains new, datatype, value and is_null. Both are
    #[non_exhaustive], so code outside the crates builds them with new and
    field assignment rather than a struct literal.

Fixed

  • geopackage-ffi no longer exports the Rust methods of its handle types,
    other than Container::gpkg. Safe Rust could use them to drop a
    Container while a LayerHandle or TilesHandle still pointed into it.
    The C ABI does not change.

0.12.0

Choose a tag to compare

@urschrei urschrei released this 15 Oct 23:03
2525546

Added

  • Error::NanAncillaryValue, for a NaN in a coverage's ancillary row or a
    tile's. SQLite stores NaN as NULL, so neither table can store one.
  • GeometryError::InteriorRingsWithoutExterior, for a polygon with interior
    rings and an empty exterior ring.
  • DateTime::format_strict returns the strict 1.4 text of an instant,
    normalised to UTC and floored to the millisecond.
  • Error::NoSuchRow, for a ROWID a table does not have.
  • Finding::StaleSpatialIndex, for a spatial index whose virtual table or
    whose triggers are missing. Layer::repair_spatial_index repairs it.
  • Error::NanEpoch, for a NaN epoch in a spatial reference system row.

Changed

  • features_in selects no feature for a box with a NaN edge or with a
    minimum above its maximum. An inverted box used to select every envelope
    wide enough to span it, and on a layer without a spatial index a NaN edge
    was an SQLite error.
  • cursor_in and TileMatrixSet::tile_range select the tile on each side of
    a shared tile edge that a box's west or north edge lies on, as the docs
    stated. Before, only a box's east and south edges did.
  • TileMatrixSet::tile_bounds calculates each tile edge once, so adjacent
    tiles share their edges exactly and the outer edges are the extent's.
    tile_at returns the tile whose bounds contain the position.
  • Creating a layer, attribute table, tile pyramid or coverage whose name
    begins sqlite_, in any case, is Error::ReservedTablePrefix. It used to
    be an SQLite error.
  • encode_gpb, and with it FeatureWriter and write_all, rejects a
    geometry nested more than 32 levels deep (GeometryError::NestingTooDeep)
    and a polygon with interior rings but no exterior ring. The first could not
    be read by the ST_* functions or indexed; wkb 0.9.3 wrote the second
    with a ring count of zero, so its holes were lost on read.
  • create_coverage and CoverageWriter::put_with_ancillary reject a NaN
    in the ancillary row. A NaN scale or offset was an SQLite error, and a NaN
    data_null or statistic read back as None.
  • A DATETIME is written in the strict 1.4 form, normalised to UTC and
    floored to the millisecond, by write_all, FeatureWriter and
    write_arrow. A value with sub-millisecond digits or a UTC offset used to
    be written in a form the default strict read rejects. A value whose offset
    moves it outside years 0 to 9999 is Error::InvalidDateTimeValue.
  • write_arrow checks each batch's column types against the layer's before
    writing its rows: a column takes the Arrow type a read gives it, a narrower
    or unsigned integer, Float32, LargeUtf8, LargeBinary, or a timestamp
    in any unit. It used to write any type into any column. Unsigned integers
    and second and nanosecond timestamps, which from_arrow_schema already
    mapped, are now written; a UInt64 above i64::MAX is an error.
  • The Arrow reads use the layer's StorageStrictness, as the row path does,
    and read a geometry cell that is not a BLOB as a null geometry instead of
    failing the batch.
  • read_arrow_in and read_arrow_in_where select no row for a box with a
    NaN edge or inverted edges, as features_in does. read_arrow_in returns
    its rows in key order; its docs no longer say features_in's order.
  • add_metadata_reference checks that a column target's column
    (Requirement 98) and a row target's ROWID (Requirement 99) exist, and
    writes its timestamp in the strict form. A row in a view is not checked.
  • RelationName::is_conformant judges the string a name writes: an
    Extended name with an empty author or name, or an author containing _,
    is not conformant, because it reads back as another name; Other holding a
    class name is. add_relation follows it. MetadataScope::is_listed also
    judges the written name.
  • Extension::support judges the name a value writes: a GeometryType of a
    core type is Unrecognised, and Other holding a known name has that
    extension's support.
  • create_attributes_table, coverage tile writes, add_relation and
    add_mapping return Error::UnsupportedExtension when an extension the
    crate does not know applies to the table, as the feature and tile writes
    already did. The blocking_extension docs list the writes that check.
  • add_relation checks its mapping table's name as every other creation path
    does: an empty or NUL name is InvalidIdentifier, and a gpkg_ or
    sqlite_ prefix is ReservedTablePrefix.
  • Once a file has the definition_12_063 column, add_srs and
    add_epsg_srs give an EPSG row without WKT2 of its own the EPSG
    registry's WKT2, as adding the column already did for the rows present.
    The table no longer depends on the order of the calls: a WKT1 code added
    after a WKT2-only code used to get undefined.
  • add_srs rejects a NaN epoch with Error::NanEpoch. It used to store
    NULL, which reads back as no epoch, and still add the WKT2 columns.
  • Error::UnknownEpsgCode says the code is in neither the vendored
    definitions nor the EPSG registry. It used to name only the vendored
    subset.
  • geopackage-ffi: an SQLite constraint failure, such as an insert with a
    feature id already in use, is GPKG_STATUS_CONSTRAINT instead of
    GPKG_STATUS_IO. A file that is not an SQLite database is
    GPKG_STATUS_NOT_A_GEOPACKAGE instead of GPKG_STATUS_IO, as an empty
    file or a plain SQLite database already was.
  • geopackage-ffi: FloatCoverageScaled, NanAncillaryValue,
    UnwritableCoveragePayload, NoCoverageAncillary and
    InteriorRingsWithoutExterior have a status category instead of
    GPKG_STATUS_OTHER.
  • A NaN written to a REAL column is stored as NULL and a negative zero as
    zero, as SQLite stores them; the write docs now say so.
  • Dev-dependency hegeltest is now 0.49.11 in geopackage and
    geopackage-core, and new in geopackage-ffi; hegel.toml runs 2000
    cases per property test.

Fixed

  • A coverage put that failed after writing its tile left the tile without
    its ancillary row in the writer's transaction. Each put is now undone as a
    whole.
  • audit_spatial_index reported an index as inconsistent where SQLite's
    RTree stores a coordinate beyond the f32 range as an infinite bound, or a
    subnormal coordinate as the nearest f32. A rebuild could not fix it. The
    bulk index build fell back to the triggered build for the same data.
  • Date::from_days_since_epoch panicked for a count beyond about 20,000
    years from 1970, instead of returning OutOfRange.
  • DateTime::micros_since_epoch rounded an instant before 1970 with
    sub-microsecond digits up to the next microsecond, which at
    1969-12-31T23:59:59.9999995Z moved it into 1970.
  • A GPB header's Z range included the Z of a coordinate whose X or Y is not
    finite, such as an empty point, which the XY range already left out.
  • gpb::body_offset reported a 4 to 7 byte blob with a bad magic as
    BadMagic, where parse_header reports it as Truncated.
  • DateTime::micros_since_epoch and from_micros_since_epoch failed for an
    instant after 9999-12-30T22:00Z, so an Arrow read of such a DATETIME
    failed.
  • tile_at and tile_range could miss tiles where several tiles thinner
    than the coordinates' resolution share one rounded edge.
  • validate failed with an error for a gpkg_contents row of a feature
    table or a coverage whose table is absent, instead of reporting
    MissingContentsTable.
  • validate failed with an error for a spatial index whose virtual table is
    absent, and reported nothing for one whose triggers are absent. It reports
    both as StaleSpatialIndex.
  • validate reported no dangling metadata reference once every metadata
    record was deleted.
  • Adding the WKT2 column filled in a row's WKT2 from its srs_id, not from
    its organization_coordsys_id. A row whose id is not its EPSG code got
    another CRS's definition, or none.
  • geopackage-ffi: gpkg_writer_insert, gpkg_writer_update and
    gpkg_writer_update_column returned GPKG_STATUS_INVALID_ARGUMENT for a
    NULL or non-UTF-8 text value, while the error they filled in said
    GPKG_STATUS_BAD_ARGUMENT. gpkg_layer_read_arrow_filtered returned
    GPKG_STATUS_BAD_ARGUMENT for an invalid date parameter, while the error
    said GPKG_STATUS_INVALID_ARGUMENT. Each now returns the status its error
    reports.
  • geopackage-ffi: the gpkg_tiles_put docs said an address outside the
    grid or a payload of the wrong size returns GPKG_STATUS_OTHER. They
    return GPKG_STATUS_INVALID_ARGUMENT and GPKG_STATUS_CONSTRAINT.

0.11.2

Choose a tag to compare

@urschrei urschrei released this 15 Oct 11:33
2fbc978

Added

  • Each GitHub release has gpkg binaries for x86_64 and aarch64 Linux,
    x86_64 and aarch64 macOS, and x86_64 Windows, built with the workspace's
    SQLite compile flags. cargo binstall geopackage-cli installs them. A
    cargo install from crates.io does not get the flags unless
    LIBSQLITE3_FLAGS is set in the environment: without them, gpkg copy of
    the benchmark subsets takes 8 to 25 % longer.

Changed

  • The README, the crate documentation and the book install gpkg with
    cargo binstall geopackage-cli, and give the LIBSQLITE3_FLAGS setting
    for cargo install. geopackage-cli states the layout of its release
    archives in [package.metadata.binstall].

0.11.1

Choose a tag to compare

@urschrei urschrei released this 15 Oct 10:14
2674ff2

Added

  • OpenOptions::mmap_size reads the file through a memory map of up to the
    given size (PRAGMA mmap_size). It is off by default. A threaded
    read_arrow gives its worker connections the same size.
  • The ST_EnvIntersects(geom, minx, miny, maxx, maxy) SQL function, with the
    name and arguments of GDAL's, is registered with the ST_* functions.

Changed

  • Builds from this repository compile the bundled SQLite without
    SQLITE_ENABLE_MEMORY_MANAGEMENT and with SQLITE_DEFAULT_MEMSTATUS=0,
    through LIBSQLITE3_FLAGS in .cargo/config.toml. With the first flag, all
    connections in a process shared one page cache behind one mutex, so the
    threads of a threaded read_arrow waited for each other. A 4-thread read of
    the rivers dataset takes 1.5 s instead of 1.76 s, and an 8-thread read 0.82 s
    instead of 1.23 s. The crate documentation of the bundled feature gives
    the same setting for dependants. A cargo install from crates.io does not
    read this file.
  • read_arrow sizes the text, blob and geometry buffers of each batch from
    the bytes per row of the batch before it, instead of from a fixed estimate,
    so that a buffer does not grow and copy itself while the batch is filled. A
    read of the rivers dataset has 18,000 page faults instead of 129,000, and
    takes 5.1 s instead of 5.5 s on one thread and 1.39 s instead of 1.56 s on 4.
  • read_arrow reads each row's geometry once, instead of once for the batch's
    byte ceiling and again to append it. When the key is one of the selected
    columns, the batch's last key comes from that column. A read of the
    buildings dataset executes 3.9 % fewer instructions, and of the rivers
    dataset 1.3 % fewer.
  • GeoPackage::open and open_read_only open the connection with
    SQLITE_OPEN_NO_MUTEX, as create already did. SQLite no longer locks a
    mutex around each column read: a scalar read of the rivers dataset takes
    8.2 s instead of 10.2 s.
  • Row reads select the columns in the order the table stores them. On a table
    that stores the geometry first, as GDAL does, SQLite no longer
    reads a row's last overflow page twice: a scalar read of the admin dataset
    takes 3.0 s instead of 3.4 s.
  • A threaded read_arrow no longer needs a primary key without gaps, and no
    longer counts the rows first. Workers read windows of batch_size
    consecutive keys, so a batch has fewer rows where the key has gaps. A read
    of the buildings dataset takes 1.4 s instead of 2.8 s.
  • read_arrow fills each batch with SELECT agg(...) FROM t WHERE key BETWEEN a AND b instead of wrapping a LIMIT query in a subquery, which
    SQLite copied every text and blob value out of. A single-threaded read of
    the rivers dataset takes 5.3 s instead of 7.4 s, and a threaded one 1.7 s
    instead of 2.2 s.
  • A bounding-box query on a layer with no spatial index tests each row's
    envelope in SQL, with ST_EnvIntersects, so SQLite reads only the geometry
    of a row outside the box. features_in_sql returns the new query, which
    has four box parameters. A query of the rivers dataset takes 1.7 s instead
    of 3.2 s.
  • roadmap/benchmarks/README.md replaces the dated benchmark write-ups. It
    compares the library and gpkg copy with GDAL 3.13.3.
  • scripts/bench_datasets.sh measures over subsets of about 250 MB per
    dataset, which its subset mode makes, and times gpkg copy against
    ogr2ogr as one more operation. Peak memory comes from the timed runs.
    GDAL's results are kept in one file per GDAL version, so a run with them
    cached measures this crate's side only. scripts/bench_fly.sh bench builds
    a local jj revision.
  • scripts/bench_fly.sh quick <revA> <revB> compares two local revisions in
    about a minute, by the instructions each operation executes on the
    benchmark subsets (scripts/quick_ab.sh).
  • scripts/bench_datasets.sh times GDAL beside this crate for each operation,
    through the new scripts/gdal_dataset_bench.c. The dataset_bench write
    and index arms use synchronous = OFF, and its box query builds each
    geometry.

Removed

  • scripts/compare_gdal_arrow.sh, scripts/compare_gdal_arrow_write.sh,
    scripts/compare_gdal_index.sh, scripts/compare_gdal_copy.sh,
    scripts/gdal_baseline.sh, their C programs, the arrow_bench and
    index_bench examples, and scripts/bench_fly.sh copy.
    scripts/bench_datasets.sh replaces them.