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

Concern multiple geometries in same layer for geopackage #108

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

signedav
Copy link
Member

@signedav signedav commented Sep 27, 2024

  • Passing parameter gpkgMultiGeomPerTable
  • Building layer url including geometry-column if the layer source is used multiple times (because of multiple geometries in a table)

This does only work with GDAL version >=3.8. Means depending on the QGIS Version. Windows Builds have it since quite a while (3.36) but Ubuntu from the current repositories not yet.

When a schema is created with this parameter gpkgMultiGeomPerTable it can neither create a project on QGIS with GDAL<3.8 nor read a project that has been created on a QGIS with GDAL<3.8

Solution:

  • The setting for gpkgMultiGeomPerTable is only available for QGIS with GDAL>=3.8 See Multiple Geometries on Geopackage ili2db parameter QgisModelBaker#970
    image
    Otherwise the setting is invisible and the parameter is false
  • On creating a project it checks (a) gpkgMultiGeomPerTable and (b) GDAL>=3.8 and maybe (c) if there are in fact such tables with multiple geometries (because otherwise it doesn't care)
  • Tests

@signedav signedav marked this pull request as draft September 27, 2024 09:13
@signedav
Copy link
Member Author

signedav commented Oct 18, 2024

Find current GDAL Version of Windows Builds
https://github.com/jef-n/OSGeo4W/tree/master/src/gdal/osgeo4w
Means we can check the QGIS version to decide if we do it or we dont...

Current Ubuntu Nightly still with 3.4 apparently. Depending on the repository there... maybe we can check the GDAL Version directly, but I don't know how at the moment. Something like:

  const QString gdalVersionCompiled { GDAL_RELEASE_NAME };
  const QString gdalVersionRunning { GDALVersionInfo( "RELEASE_NAME" ) };

but not sure how it's handled in QGIS Api.

Edit:

See this https://stackoverflow.com/questions/3233674/how-can-i-get-the-installed-gdal-ogr-version-from-python/3412259#3412259

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.

1 participant