-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
VFK: FIX invalid parcel "banana" geometries (fixes #3376) #11688
Conversation
ogr/ogrgeometry.cpp
Outdated
* @return a newly allocated geometry now owned by the caller, | ||
* or NULL on failure. | ||
* | ||
* @since OGR 3.8.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @since OGR 3.8.4 | |
* @since OGR 3.11 |
ogr/ogrgeometry.cpp
Outdated
* @return a handle on newly allocated geometry now owned by the caller, | ||
* or NULL on failure. | ||
* | ||
* @since OGR 3.8.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @since OGR 3.8.4 | |
* @since OGR 3.11 |
@@ -29,3 +29,7 @@ if (GDAL_USE_SQLITE3) | |||
gdal_target_link_libraries(ogr_VFK PRIVATE SQLite::SQLite3) | |||
target_compile_definitions(ogr_VFK PRIVATE -DHAVE_SQLITE) | |||
endif () | |||
if (GDAL_USE_GEOS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the driver still useful from a practical point of view without the GEOS dependency ? If not, then making it conditioned to GEOS presence should be done in ogr/ogrsf_frmts/CMakeLists.txt y changing
ogr_dependent_driver(vfk "Czech Cadastral Exchange Data Format" "GDAL_USE_SQLITE3")
to
ogr_dependent_driver(vfk "Czech Cadastral Exchange Data Format" "GDAL_USE_SQLITE3;GDAL_USE_GEOS")
by the way seeing SQLite3 is already a mandatory dependency, one could remove the if() test at line 27, and perhaps other conditional code in the driver, but that's admintedly not directly in the scope of this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The drive can be built without GEOS. In that case drive will warn about this situation during conversion and building polygon geometries (layers BUD, PAR} will be skipped. All other data will be imported.
Warning 6: GEOS support not enabled. Unable to build geometry for PAR.
Warning 6: GEOS support not enabled. Unable to build geometry for BUD.
you can add at the end of the commit message (preferably using the email associated to his github account if he has one) so that git properly attributes authorship
|
ok, so we have a test failure on configuration https://github.com/OSGeo/gdal/actions/runs/12838383582/job/35807308362?pr=11688 where we have SQLite support but not GEOS. So depending on the answer to my question of #11688 (comment), either make the driver GEOS dependent, or add a "@pytest.mark.require_geos" decoration to the failed test |
Fixes OSGeo#11663 ``` $ cat ~/gdal-feedstock/recipe/meta.yaml | sed -E 's/set version = "([0-9]+)\.([0-9]+)\.([0-9]+)"/set version = "\1.\2.99"/' | head -n 1 {% set version = "3.10.99" %} ```
…() to load polygons
Co-authored-by: Petr Zima <zima@matfyz.cz>
336c427
to
0237ddc
Compare
I have decided for "@pytest.mark.require_geos" and not fully require GEOS. |
Fixes invalid polygon geometry building by replacing old algoritm with GEOS BuildArea() function. (Added OGRGeometry::BuildArea()/OGR_G_BuildArea() and GEOSBuildArea() to load polygons geometries in VFK.
Introduces on GEOS drive with about 10% performance penalty.
Thanks to Petr Zima as the main author.