Git Product home page Git Product logo

mapsprinter's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mapsprinter's Issues

Fix for world file not being generated

Hi there. Downloaded yesterday for QGIS 3.6.2 (Windows). Super plugin!

I have found and solved one issue - when exporting to png, a layout's setting to generate a world file was not being respected.

The problem was in maps_printer.py, overrideExportSetings(). The current code
if layout.customProperty('exportWorldFile') == True : exportSettings.generateWorldFile = True
need to be changed to
if layout.customProperty('exportWorldFile') == 'true' : exportSettings.generateWorldFile = True
since the output of customProperty is a string not a boolean.

Not sure if this was a typo, or if these undocumented custom properties have changed since when you programmed it. In any case, for me with the above change it is fixed.

Add print all composers in all projects in directory

First thank you for this plugin, works great for me. I did very similar tool for Mapinfo but it works for all layouts in all workspaces in directory. So all you need is to select directory and which format you want and it will pdf/jpg... everything.

Now, at this point I consider myself as beginner with python, I believe I am able to adjust this plugin to fit our needs but it probably won't be "high standard" code adjustments. So I am wondering if there is some chance you would add this option? Or interested in me to pull request once I am done with my "try"?

Algorithm from a folder is not available

Describe the bug

After installing the MapsPrinters Master Plugin from the ZIP in QGIS 3.16, the export algorithm from a folder is not available in the plugin options. Only the grouped layout export is available.

Atlas-PDF-export only as single file possible

First I want to say, that this plugin is very helpful!! And I don't know if it is a bug or it should be like this: If I print an Atlas as pdf and I Do NOT select the possibility "single file export when possible", I get different results with the MapsPrinter or printing in QGIS. Right from Qgis I get for each Atlas-feature one pdf with the name given in "Output filename expression". When I print the pdf with the MapPrinter I get only one PDF-file with all the features-pages and it named like the layout.
Can I print with the MapsPrinter a PDF-file for each Atlas-feature instead a single file for all together?

Field with formula in layout does not update

I have layouts containing HTML elements with formula like this: [%@layout_name%]

The formulas does not update/show on the exported pdf .

I solved the problem adding a line to refresh the layout before printing: exporter.layout().refresh()
…..

    # Do the export process
    exporter = QgsLayoutExporter(cView)
    
    #refresh the layout before printing
    exporter.layout().refresh()

    # Allow export cancelation
    QCoreApplication.processEvents()
    self.dlg.buttonBox.rejected.connect(self.stopProcessing)

….

I tested a normal layout and it worked. I did not test it with atlas.

Could you update update the code?

I would appreciate if you mention my name with this small (but important) contribution.

Regards

One out of twenty layouts cannot be printed to pdf

I have a QGIS project with 20 layouts of which one cannot be printed to PDF (but it can be printed to PNG). All layouts are very similar.

Error message is:

Exporting layout '10 Vehicle lost time zoom' Traceback (most recent call last): File "C:\Users/MAP/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\MapsPrinter\processing_provider\export_layouts_from_project.py", line 163, in processAlgorithm result = self.processor.exportCompo(cView, outputFolder, title, extension, feedback=feedback) File "C:\Users/MAP/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\MapsPrinter\processor.py", line 97, in exportCompo exportSettings = self.overrideExportSettings(cView, extension) File "C:\Users/MAP/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\MapsPrinter\processor.py", line 212, in overrideExportSettings exportSettings.exportThemes = layout.customProperty('pdfExportThemes') TypeError: str cannot be converted to a C/C++ QStringList in this context

I am using QGIS version
3.30.2-'s-Hertogenbosch
and Maps Printer version 0.9
Under Windows 10

  • Maps Printer Version [e.g. 0.3]

Skærmbillede 2023-05-24 213621
Skærmbillede 2023-05-24 213644

Include project file name in atlas output files of the "Export layouts from folder" algorithm

Is your feature request related to a problem? Please describe.
With the "Export layouts from folder" algorithm, the number of output files can increase quickly. In order to make them unique the files name is a concatenation of project_files+_+layout_output. But not for atlas output. Since they are stored in the same folder, there's a potential risk of name collision resulting in "data" lost or corruption.

Describe the solution you'd like
To avoid/minimize the risk, it could be nice to add project file name to atlas output files

Export fails when layout name contains slash

Describe the bug
If a layout name happens to contain a slash, the export fails.

To Reproduce
Steps to reproduce the behavior:

  1. Create a layout with a slash in its name, e.g. "Exampletown North/South-Link".
  2. Try exporting the layout via Maps Printer.
  3. It fails.

Expected behavior
The layout is exported, any characters in the layout title that are illegal for file names (at the very least the path separator, on Windows the full complement of illegal characters seems to be \ / : ? " < > |) are replaced by some suitable substitute. If I try exporting that layout directly via QGIS's built-in export, the proposed default filename replaces the slash with an underscore, Maps Printer should do something similar.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • QGIS version: 3.10.7-A Coruña
  • OS: Windows 10
  • Maps Printer Version 0.8

The export algorithm from a folder is not available

Describe the bug

After installing the MapsPrinters Master Plugin from the ZIP in QGIS 3.16, the export algorithm from a folder is not available in the plugin options. Only the grouped layout export is available.

Atlas controlled layout overwriting itsself

The problem occures when exporting an atlas to a single pdf, with multiple pages.
The QGIS function in the layout is working fine but when I try to automate the process with Maps Printer, there's only a pdf with the last page. By watching the process, I can see that all the pages are made but they overwrite themselves.

The bulk export of multiple atlas layouts with the 'maps printer plugin' used to work fine in the past, It's not clear to me why it is not working now.

I’m using QGIS 3.16.14 on windows,and the Maps Printer 0.9 version.

Thanks for looking in to this!
Wouter

Maps Printer does not respect the resolution set in the Print Layout

It looks like if I set a lower Export Resolution (250DPI under Export Settings > Export Resolution) for the PDF in the Print Layout (to reduce file size), it still exporting a higher res version (Print as Raster = TRUE).

For example, when I use Maps Printer, the file generated is 241MB. When I export manually from the Print Composer (Layout > Export PDF), the resulting file is 14MB.

Operation interrupted : : Maps have been exported before cancelling. Some files may be incomplete.

I keep getting this error popping up when trying to export maps and nothing ever gets exported. Here is info from the log view:

`2018-10-28T08:59:37 WARNING warning:C:\PROGRA~1\QGIS3~1.2\apps\Python36\lib\site-packages\dateutil\tz\win.py:247: DeprecationWarning: invalid escape sequence {
tzkeyname = text_type('{kn}{sn}').format(kn=TZKEYNAME,

         traceback: File "", line 1, in 
          File "C:/PROGRA~1/QGIS3~1.2/apps/qgis/./python\qgis\utils.py", line 337, in startPlugin
          plugins[packageName] = package.classFactory(iface)
          File "C:/PROGRA~1/QGIS3~1.2/apps/qgis/./python/plugins\MetaSearch\__init__.py", line 29, in classFactory
          from MetaSearch.plugin import MetaSearchPlugin
          File "C:/PROGRA~1/QGIS3~1.2/apps/qgis/./python\qgis\utils.py", line 665, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 961, in _find_and_load
          File "", line 950, in _find_and_load_unlocked
          File "", line 655, in _load_unlocked
          File "", line 678, in exec_module
          File "", line 205, in _call_with_frames_removed
          File "C:/PROGRA~1/QGIS3~1.2/apps/qgis/./python/plugins\MetaSearch\plugin.py", line 34, in 
          from MetaSearch.dialogs.maindialog import MetaSearchDialog
          File "C:/PROGRA~1/QGIS3~1.2/apps/qgis/./python\qgis\utils.py", line 665, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 961, in _find_and_load
          File "", line 950, in _find_and_load_unlocked
          File "", line 655, in _load_unlocked
          File "", line 678, in exec_module
          File "", line 205, in _call_with_frames_removed
          File "C:/PROGRA~1/QGIS3~1.2/apps/qgis/./python/plugins\MetaSearch\dialogs\maindialog.py", line 50, in 
          from owslib.csw import CatalogueServiceWeb # spellok
          File "C:/PROGRA~1/QGIS3~1.2/apps/qgis/./python\qgis\utils.py", line 665, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 961, in _find_and_load
          File "", line 950, in _find_and_load_unlocked
          File "", line 655, in _load_unlocked
          File "", line 678, in exec_module
          File "", line 205, in _call_with_frames_removed
          File "C:\PROGRA~1\QGIS3~1.2\apps\Python36\lib\site-packages\owslib\csw.py", line 27, in 
          from owslib.util import OrderedDict
          File "C:/PROGRA~1/QGIS3~1.2/apps/qgis/./python\qgis\utils.py", line 665, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 961, in _find_and_load
          File "", line 950, in _find_and_load_unlocked
          File "", line 655, in _load_unlocked
          File "", line 678, in exec_module
          File "", line 205, in _call_with_frames_removed
          File "C:\PROGRA~1\QGIS3~1.2\apps\Python36\lib\site-packages\owslib\util.py", line 13, in 
          from dateutil import parser
          File "C:/PROGRA~1/QGIS3~1.2/apps/qgis/./python\qgis\utils.py", line 665, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 1009, in _handle_fromlist
          File "", line 205, in _call_with_frames_removed
          File "", line 961, in _find_and_load
          File "", line 950, in _find_and_load_unlocked
          File "", line 655, in _load_unlocked
          File "", line 678, in exec_module
          File "", line 205, in _call_with_frames_removed
          File "C:\PROGRA~1\QGIS3~1.2\apps\Python36\lib\site-packages\dateutil\parser.py", line 43, in 
          from . import tz
          File "C:/PROGRA~1/QGIS3~1.2/apps/qgis/./python\qgis\utils.py", line 665, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 1009, in _handle_fromlist
          File "", line 205, in _call_with_frames_removed
          File "", line 961, in _find_and_load
          File "", line 950, in _find_and_load_unlocked
          File "", line 655, in _load_unlocked
          File "", line 678, in exec_module
          File "", line 205, in _call_with_frames_removed
          File "C:\PROGRA~1\QGIS3~1.2\apps\Python36\lib\site-packages\dateutil\tz\__init__.py", line 1, in 
          from .tz import *
          File "C:/PROGRA~1/QGIS3~1.2/apps/qgis/./python\qgis\utils.py", line 665, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 961, in _find_and_load
          File "", line 950, in _find_and_load_unlocked
          File "", line 655, in _load_unlocked
          File "", line 678, in exec_module
          File "", line 205, in _call_with_frames_removed
          File "C:\PROGRA~1\QGIS3~1.2\apps\Python36\lib\site-packages\dateutil\tz\tz.py", line 27, in 
          from .win import tzwin, tzwinlocal
          File "C:/PROGRA~1/QGIS3~1.2/apps/qgis/./python\qgis\utils.py", line 665, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 961, in _find_and_load
          File "", line 950, in _find_and_load_unlocked
          File "", line 655, in _load_unlocked
          File "", line 674, in exec_module
          File "", line 781, in get_code
          File "", line 741, in source_to_code
          File "", line 205, in _call_with_frames_removed`

And here is my version info:

`QGIS version 3.2.0-Bonn QGIS code revision bc43194061
Compiled against Qt 5.9.2 Running against Qt 5.9.2
Compiled against GDAL/OGR 2.2.4 Running against GDAL/OGR 2.2.4
Compiled against GEOS 3.6.1-CAPI-1.10.1 Running against GEOS 3.6.1-CAPI-1.10.1 r0
PostgreSQL Client Version 9.2.4 SpatiaLite Version 4.3.0
QWT Version 6.1.3 QScintilla2 Version 2.10.1
PROJ.4 Version 493`

XMDF vector arrow handling in PDF 3.12+

The 'display vector on user grid' is ignored when batch printing to PDF where the layout map windows include TUFLOW generated XMDF layers. This occurs in versions 3.12 and 3.14. While version 3.10 appears to function correctly the density of vector arrows in the map window do not match the vector density of the printed PDF layout (WYSIWYG mismatch).
Incorporation of a batch-print function in QGIS core would be very welcome!

Option to sort "Layouts to export" list of layouts alphabetically

Is your feature request related to a problem? Please describe.
When selecting Layouts to Export the list of layouts cannot be sorted, making it difficult to select the layouts you want when there are a large number of them.

Describe the solution you'd like
An option to sort the layouts list alphabetically (I think at the moment it sorts by last opened).

Describe alternatives you've considered
None.

Additional context
None.

Export fail to a temporary folder

Describe the bug

Version de QGIS : 3.20.3-Odense
Révision du code : 495fbaec
Version de Qt : 5.15.2
Version de Python : 3.9.5
Version de GDAL : 3.3.1
Version de GEOS : 3.9.1-CAPI-1.14.2
Version de Proj : Rel. 8.1.1, September 1st, 2021
Version de PDAL : 2.3.0 (git-version: eac774)
Traitement de l'algorithme…
Démarrage de l'algorithme 'Export de mises en page depuis un dossier'…
Paramètres en entrée:
{ 'EXTENSION' : 0, 'OUTPUT_FOLDER' : 'TEMPORARY_OUTPUT', 'PREFIX' : False, 'PROJECTS_FOLDER' : 'T:\21F010_EH_hydromorpho_aval_gave_Oloron\7_SIG', 'RECURSIVE' : False, 'RESOLUTION' : 90 }

ERREUR: Le dossier de sortie indiqué n'est pas valide. Impossible de continuer...

Execution completed in 0.30 secondes
Résultats :
{'OUTPUT': None}

Chargement des couches de résultat
Algorithme 'Export de mises en page depuis un dossier' terminé

Allow to export layouts from sub-folders

Is your feature request related to a problem? Please describe.
We can export layouts from project files within a folder but not from projects in sub-folders.

Describe the solution you'd like
Add a checkbox to decide whether sub-directories should be included in folders to fetch the layouts from. A prototype is at master...folderRecursive

We should also consider how to manage the sub-directories projects output files location

MapsPrinter - Can't export to PDF

Hello MapsPrinter,

I have a problem with the plugin on QGIS 3.4. Have used it before on QGIS 2.18. Really need it for a batchplot for my project. I hope you can fix it or help me out in one way. It's eather a bug or I cam doing something wrong :) Thanks for the awesome plugin, great job!

2019-03-19_17h57_46

Export in PDF change police's size

Hi,

When I export composers from maps printer in PDF, It change the police's size of graticule (from 8 to 4 I think). It happened from two differents pc with qgis 2.8.3.

Thanks,

Bye,

Gladal

Check layout validity

Is your feature request related to a problem? Please describe.
When exporting a layout from within QGIS, there's a validity check to flag problems, eg when a map item has an overview which is not linked to any existing maps. A message box is then displayed whether to continue the export or not. Skipping this check can result in wrong/incomplete map.

Describe the solution you'd like
It could be nice to have such a mechanism with Maps Printer. Actually, instead of a message box, we could just report the missing items for each map.

Describe alternatives you've considered
We can have a global setting to decide the behavior in such case:

  • ignore the check and continue the export
  • skip the layout's export if there's a missing item
  • stop the whole export process

In all the cases a summary of the "broken" layouts until the stop should be output.

Better organize output files exporting from folders

Is your feature request related to a problem? Please describe.
With the "Export layouts from folder" algorithm, the number of output files can increase quickly. In order to make them unique the file name is a concatenation of project_file+_+layout_output. Since they are stored in the same folder, there's a potential risk of name collision resulting in "data" lost or corruption but it could also be hard to find outputs from the list.

Describe the solution you'd like
It could be nice to add output files in corresponding sub folders. Different scenarios are possible. Within the output folder:

  • create a folder for each project file and add its output files
  • create a folder for each sub-directory in input folder (assuming we can export sub-folders' layouts as requested in #30 ) and place output from its project files within, keeping same folder structure than input folder --- This option is implemented as a default behavior for subdirectories files in ca7d561

The choice can be set through a combobox.

Allow to export print reports

Is your feature request related to a problem? Please describe.
Only print layouts are currently supported. It could be nice to allow export of print reports.

.*gw : format différent

Fichier _._gw

Avec QGIS

19.109211
0.000000
0.000000
-19.109211
545454.633843
5559723.689351

Avec MapsPrinter

19.1092110003

0.0

0.0

-19.1092110003

545454.633843

5559723.68935

Un retour à la ligne en trop après chaque données.

Question
Comment faites vous pour avoir une précision supérieur, 10 chiffres après la virgule contre 6 pour QGIS (sauf pour les 2 dernières valeurs) ?

Export at different DPI settings

Hi. First, thank you for the great plug-in, I find it to be a big time saver for me. My issue is that I have a setup with many different print layouts and I would like to be able to export all of them at varying DPI. By default, each layout is set to 300 DPI, but to change it involves opening every layout and adjusting the DPI setting (and then reverting that if there is a need to re-export at the old DPI). Is there any way of adding a DPI setting to the Maps Printer to allow for a global change of DPI on export?
Thanks.

Atlas export to PDF creates multiple files when export to single file is selected

Describe the bug

image
image

Version de QGIS : 3.20.1-Odense
Révision du code : 1c3c5cd6
Version de Qt : 5.15.2
Version de Python : 3.9.5
Version de GDAL : 3.3.1
Version de GEOS : 3.9.1-CAPI-1.14.2
Version de Proj : Rel. 8.1.0, July 1st, 2021
Version de PDAL : 2.3.0 (git-version: eac774)
Traitement de l'algorithme…
Démarrage de l'algorithme 'Export des mises en page du projet'…
Paramètres en entrée:
{ 'EXTENSION' : 0, 'LAYOUTS' : [1], 'OUTPUT' : 'T:\21F0\1_RAPPORTS', 'RESOLUTION' : 150 }

Export de la mise en page 'Q10 - hauteur' en cours
Mise en page exportée!
Export terminé!
Execution completed in 14.74 secondes
Résultats :
{'EXPORTEDLAYOUTS': 1,
'OUTPUT': 'T:\21F0\1_RAPPORTS'}

Chargement des couches de résultat
Algorithme 'Export des mises en page du projet' terminé

I could create a small project to reproduce if you want.

Naming conflict when exporting to png.

Just want to log this as an issue since I figured out a solution that may be useful to others.

Feel free to close.

If I export multiple atlas layouts to pdf, the pdf is given the layout name, with a page for each atlas view. If I export the atlases to PNG, the images are named after each of the atlas page names.

I'm using the same geometry layer to define the pages of the two atlases. This means image exports saved over each other since they have the same name across different layouts.

To dynamically name the pages of the atlas after the layout name plus the page name:

  1. In the Atlas Settings tab in the layout window, change "Output filename expression" to:
    to_string(@layout_name) + '_' + to_string("Name")

Single file export when possible

Hey DealzJ,
Is there a way to summarize the export in one PDF. The output file is "Scale 1" and appears to be damaged. Are there already solutions to the problem?
thank you in advance!
Zyxel01

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.