Skip to content

When querying a GPKG file using set_spatial_filter, an error is thrown: failed: no such module: RTREE #707

Description

@allenlu2008

I got this error while running a spatial query on a GPKG file:
failed: no such module: RTREE

let mut layer = ds.layer(1).unwrap();

    let minx = 116.28980018951;
    let maxx = 116.382238026522;
    let miny = 39.9115367441475;
    let maxy = 39.9705609041443;

    layer.set_spatial_filter_rect(minx, miny, maxx, maxy);

ERROR 1: sqlite3_prepare_v2(SELECT COUNT(*) FROM "rtree_POI_Shape" WHERE maxx >= 116.289800189500 AND minx <= 116.382238026532 AND maxy >= 39.911536744137 AND miny <= 39.970560904154) failed: no such module: RTREE
ERROR 1: failed to prepare SQL: SELECT m."OBJECTID", m."Shape", m."NAME", m."LAYER", m."MARINE", m."RegionName", m."DataLevel", m."MP_TYPE", m."Phone", m."StreetDesc", m."HighwayIdx", m."ZipIdx", m."City" FROM "POI" m JOIN "rtree_POI_Shape" r ON m."OBJECTID" = r.id WHERE r.maxx >= 116.289800189500 AND r.minx <= 116.382238026532 AND r.maxy >= 39.911536744137 AND r.miny <= 39.970560904154。

gdal version 3.10
crates gdal 0.18.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions