carey136 / Standalone-Export-Atlas-QGIS3

Standalone Script to Export Atlas to PDF/images
GNU General Public License v3.0
10 stars 0 forks source link

Layers in a different CRS from the project #5

Open igeofr opened 4 years ago

igeofr commented 4 years ago

Hi, When I export my project that includes layers in two projection systems, the layers that are reprojected on the fly are not printed or not correctly.

Probably a particular parameter, do you have an idea?

PS: Thank you for this script.

carey136 commented 4 years ago

Hi @igeofr ,

I haven't had much need to export in with on the fly projection which is probably why this issue hasn't appeared in my own use of the script.

I have completed the following test to try and replicate the issue. In each case, the native projection of the project is EPSG:27700 (British National Grid):

  1. Adding a vector shapefile layer (found here)layer with projection WGS 84 (EPSG:4326).

Result - When exporting with python or directly using QGIS, the export correctly reprojected the output and was included on the map as expected

  1. Adding the OSM basemaps with map projection WGS 84 / Pseudo Mercator projection (EPSG 3857) from the Quick Map Services plugin

Result - As above, when exporting with python or directly using QGIS, the export correctly reprojected the output and was included on the map as expected.

Another user of the script has experienced similar issues (in particular when using the OSM WMS layer) but I haven't yet been able to replicate it.

Would you be able to let me know a little more specifically about the format and source of the layer which is not rendering on export? And are you able to export it correctly from the Atlas directly in QGIS?

Kind regards

igeofr commented 4 years ago

Thank you @carey136 for testing.

It is strange to see that in some cases, reproduction works while in others it does not. Which version of QGIS do you use? (I performed my tests with 3.10)

As far as I am concerned, I have about ten vector layers (.shp) with the projection code EPSG:2154 (French projection) and one raster layer (.tif) with the projection code EPSG:3035. And the project is in 2154. All the layers are well printed but I miss the raster but when I make a reprojection of the raster in 2154 then the printing works well.

I would like to point out that I have no problem exporting directly from QGIS.

Best regards, Thank you.

carey136 commented 4 years ago

Hi @igeofr , I'm wondering if this may be version related. The original version of the script was developed with QGIS version 3.2 which used python 3.6 whereas up to the current version QGIS uses 3.7. I'm wondering if there is some different syntax in the QGIS python API which is causing issues.

As I currently employ this script on a production server, and don't need to utilise any of the newer features in 3.4+, I am still utilising 3.2 for this purpose. As a result I haven't had the opportunity to test on newer versions. As 3.10 is the next Long Term Release, I'll find some time to start moving our clients to this version, where I'll be able to test this again.

Kind regards