Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal shapelib: SBNOpenDiskTree(): make it work with node descriptors with non-increasing nBinStart #9439

Merged
merged 3 commits into from Mar 15, 2024

Conversation

rouault
Copy link
Member

@rouault rouault commented Mar 10, 2024

@pathmapper
Copy link
Contributor

Just built and tested this branch -> spatial index is used and feature count is as expected.:

ogrinfo -ro -al -so -spat 5 5 6 6 glwd_2.shp --debug on
Shape: DBF Codepage = LDID/87 for glwd_2.shp
Shape: Treating as encoding 'ISO-8859-1'.
GDAL: GDALOpen(glwd_2.shp, this=0x55b73f3d6e00) succeeds as ESRI Shapefile.
INFO: Open of `glwd_2.shp'
      using driver `ESRI Shapefile' successful.
OGR: GetLayerCount() = 1


Layer name: glwd_2
Metadata:
  DBF_DATE_LAST_UPDATE=2003-05-20
Geometry: Polygon
SHAPE: Used spatial index, got 16 matches.
Feature Count: 13
Extent: (-180.000000, -55.587208) - (180.000000, 83.575951)
Layer SRS WKT:
(unknown)
GLWD_ID: Integer64 (10.0)
TYPE: String (12.0)
POLY_SRC: String (12.0)
AREA_SKM: Real (12.1)
PERIM_KM: Real (12.1)
LONG_DEG: Real (10.2)
LAT_DEG: Real (10.2)
SHAPE: Clear panSpatialFIDs
GDAL: GDALClose(glwd_2.shp, this=0x55b73f3d6e00)

@rouault rouault merged commit ffcf050 into OSGeo:master Mar 15, 2024
32 checks passed
@rouault
Copy link
Member Author

rouault commented Mar 15, 2024

The backport to release/3.8 failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply 8fb53c9b2d... Internal shapelib: SBNOpenDiskTree(): make it work with node descriptors with non-increasing nBinStart
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

stdout
Auto-merging ogr/ogrsf_frmts/shape/sbnsearch.c
CONFLICT (content): Merge conflict in ogr/ogrsf_frmts/shape/sbnsearch.c

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release/3.8 release/3.8
# Navigate to the new working tree
cd .worktrees/backport-release/3.8
# Create a new branch
git switch --create backport-9439-to-release/3.8
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 8fb53c9b2d122e88a1eef8318b0524b725bd97bd,167385ac58a2c92b01e18cc57c2fa817dee8d366,0d3e5fda6dcf50211363281e629fd79681711bb7
# Push it to GitHub
git push --set-upstream origin backport-9439-to-release/3.8
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/3.8

Then, create a pull request where the base branch is release/3.8 and the compare/head branch is backport-9439-to-release/3.8.

@rouault
Copy link
Member Author

rouault commented Mar 15, 2024

3.8 backport in #9468

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False positive ? "ERROR 1: Inconsistent shape count for bin"
2 participants