3

Description:

In QGIS, I can create a custom user projections. Create a layer that uses that projection. Save that to a geopackage (gpkg). Then share that gpkg. The layer can be viewed in another instance of qgis, however the user projection does not auto import. By import I mean being able to see the custom projection in their master list of projections.

I am aware that a user can manually create a custom projection given the projection information via a WKT projection description or proj4 string. I would like to avoid this.

From the related question a comment suggests importing a layer with arbitrary projection and selecting "Set Project CRS from layer" This will be the fall back at this time, but hoping to learn an import option.

Ideally I would want something like "set this flag", so that another qgis instance will just auto import the projection.

Question:

How do I save a layer to a gpkg with user projections that will trigger auto import of user projection? Are there values that I can change on the creation end, preferably via pyqgis?

Related question:

Import projection from existing layer This question is different in that I am trying to find out if there is something to be done on the creation side, whereas the related question is all on the import side. Additionally, gpkg at the time of that question was not big, there might be something specific to that.

2
  • 1
    On the creation side, the custom projection is already stored in the gpkg_spatial_ref_sys table. I think the questions that can be asked about it are on the import side. Commented Mar 11, 2023 at 12:14
  • 1
    @GabrielDeLuca Yes I understand its mostly on the reader side. I want to find out if there is a lower effort more automated path. Sometimes if things are a particular way it triggers additional behavior beyond the default, hence this question Commented Mar 14, 2023 at 22:37

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.