3liz / qgis-atlasprint

Export PDF using composer atlas feature, usable in server
13 stars 14 forks source link

[Bugfix] Using QgsConfigCache to load project #29

Closed rldhont closed 4 years ago

rldhont commented 4 years ago

Fixed #28

dmarteau commented 4 years ago

Will not work with py-qgis-server because project is not in cache.

dmarteau commented 4 years ago

Or more precisely, it will not solve anything because the project will be loaded twice anyway.

Gustry commented 4 years ago

@dmarteau But it will still work in another context than py-qgis-server, right? So this can still be merged ?

Is there something we can do for py-qgis-server?

dmarteau commented 4 years ago

@Gustry It will duplicate project in any context where a QgsProject instance is passed to the "executeRequest method" of QgServer.

So, no, you do not have any insurance that il will work in another context than py-qgis-server.

dmarteau commented 4 years ago

In all case, it will not be worse as it is now: i.e duplicating the project. Anyway it cannot be solved here because this is a problem that it has to be solved in the QgsProject implementation itself.

rldhont commented 4 years ago

The good solution could be to use a service to directly use the project.

For example we can add an ATLAS service with almost 2 requests:

Use the filter to rewrite parameters:

And update print_atlas to directly get the project and do not load it from path.

rldhont commented 4 years ago

The PR #30 replaced this to fix the issue about QGIS Server project cache for plugins.