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

[ogr] Fix mapinfo (multi)polygon type layers #60410

Merged
merged 6 commits into from
Feb 7, 2025

Conversation

elpaso
Copy link
Contributor

@elpaso elpaso commented Feb 3, 2025

By not flattening the geometry, it applies to all mixed geometry OGR layers

Fixes #60396

@elpaso elpaso added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Feb 3, 2025
@elpaso elpaso changed the title [ogr] Fix mapinfo (multi)polygo type layers [ogr] Fix mapinfo (multi)polygon type layers Feb 3, 2025
@github-actions github-actions bot added this to the 3.42.0 milestone Feb 3, 2025
Copy link

github-actions bot commented Feb 3, 2025

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit 58b9c3e)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 58b9c3e)

@nyalldawson
Copy link
Collaborator

@elpaso I dug DEEP into the archives, and the behavior is coming from c8ff386

Which is a fix for https://web.archive.org/web/20240715001715/https://issues.qgis.org/issues/8001. note that there's NO tests for that issue/fix, so we should add those before continuing.

That said, I think a cleaner fix would be to remove the single type conversion in the iteration loop entirely, and then implement the desired logic afterwards -- ie just before https://github.com/qgis/QGIS/blob/master/src/core/providers/ogr/qgsogrproviderutils.cpp#L2758

@elpaso elpaso force-pushed the bugfix-gh_60396-mapinfo-multipolygon branch from fd51e7f to 3743612 Compare February 4, 2025 12:33
@elpaso
Copy link
Contributor Author

elpaso commented Feb 4, 2025

@elpaso I dug DEEP into the archives, and the behavior is coming from c8ff386

Which is a fix for https://web.archive.org/web/20240715001715/https://issues.qgis.org/issues/8001. note that there's NO tests for that issue/fix, so we should add those before continuing.

That said, I think a cleaner fix would be to remove the single type conversion in the iteration loop entirely, and then implement the desired logic afterwards -- ie just before https://github.com/qgis/QGIS/blob/master/src/core/providers/ogr/qgsogrproviderutils.cpp#L2758

I refactored the whole types collapsing logic, can you please have a look?

@elpaso elpaso merged commit c1e5e62 into qgis:master Feb 7, 2025
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Source Multipolygon-geometry reads as Polygon-geometry in MapInfo TAB format
3 participants