diff --git a/README.md b/README.md index 493eb2c..ef6efd6 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ #VoGIS-Raumplanung Plot -QGIS PlugIn to create plots from cadastral data. +QGIS PlugIn to create plots of cadastral data. -Works with 2.0 and 2.2. +Tested with 2.0 and 2.2. [Demo output.](/settings-and-output/out.pdf) @@ -26,7 +26,7 @@ Data/settings needed: * writeable path to save cached community names * ortho/satellite image * shapefiles with cadastral data -* composer layouts +* [composer layouts](#layouts) ##Releases [Download latest release](https://github.com/BergWerkGIS/VoGIS-Raumplanung/releases). diff --git a/VoGISRaumplanungPlot/metadata.txt b/VoGISRaumplanungPlot/metadata.txt index 29e625f..0b2f94e 100644 --- a/VoGISRaumplanungPlot/metadata.txt +++ b/VoGISRaumplanungPlot/metadata.txt @@ -11,7 +11,7 @@ [general] name=VoGIS Raumplanung description=Create Plots from VoGIS Data. -version=0.1.1 +version=0.1.2 qgisMinimumVersion=2.0 qgisMaximumVersion=2.99 author=BergWerk GIS diff --git a/VoGISRaumplanungPlot/resources_rc.py b/VoGISRaumplanungPlot/resources_rc.py index 1bea729..cf564f6 100644 --- a/VoGISRaumplanungPlot/resources_rc.py +++ b/VoGISRaumplanungPlot/resources_rc.py @@ -2,7 +2,7 @@ # Resource object code # -# Created: Mo. Mär 3 16:02:47 2014 +# Created: Di. Mär 11 11:12:25 2014 # by: The Resource Compiler for PyQt (Qt v4.8.4) # # WARNING! All changes made in this file will be lost! diff --git a/VoGISRaumplanungPlot/ui_vogisraumplanungplot.py b/VoGISRaumplanungPlot/ui_vogisraumplanungplot.py index c5e66e8..85db083 100644 --- a/VoGISRaumplanungPlot/ui_vogisraumplanungplot.py +++ b/VoGISRaumplanungPlot/ui_vogisraumplanungplot.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'ui_vogisraumplanungplot.ui' # -# Created: Mon Mar 3 16:02:47 2014 +# Created: Tue Mar 11 11:12:25 2014 # by: PyQt4 UI code generator 4.10.3 # # WARNING! All changes made in this file will be lost! diff --git a/VoGISRaumplanungPlot/ui_vogisraumplanungplotsettings.py b/VoGISRaumplanungPlot/ui_vogisraumplanungplotsettings.py index 2fe9d72..19a81f6 100644 --- a/VoGISRaumplanungPlot/ui_vogisraumplanungplotsettings.py +++ b/VoGISRaumplanungPlot/ui_vogisraumplanungplotsettings.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'ui_vogisraumplanungplotsettings.ui' # -# Created: Mon Mar 3 16:02:47 2014 +# Created: Tue Mar 11 11:12:25 2014 # by: PyQt4 UI code generator 4.10.3 # # WARNING! All changes made in this file will be lost! diff --git a/VoGISRaumplanungPlot/vrpcomposer/vrpprintcomposer.py b/VoGISRaumplanungPlot/vrpcomposer/vrpprintcomposer.py index 284ba03..103621b 100644 --- a/VoGISRaumplanungPlot/vrpcomposer/vrpprintcomposer.py +++ b/VoGISRaumplanungPlot/vrpcomposer/vrpprintcomposer.py @@ -157,8 +157,8 @@ def export_all_features(self): if VRP_DEBUG is True: QgsMessageLog.logMessage(u'bbox old:{0}'.format(compmap.extent().toString()), DLG_CAPTION) compmap.setNewExtent(new_ext) if VRP_DEBUG is True: QgsMessageLog.logMessage(u'bbox new:{0}'.format(compmap.extent().toString()), DLG_CAPTION) - #round up to next 100 - compmap.setNewScale(math.ceil((compmap.scale()/100.0)) * 100.0) + #round up to next 1000 + compmap.setNewScale(math.ceil((compmap.scale()/1000.0)) * 1000.0) if VRP_DEBUG is True: QgsMessageLog.logMessage(u'bbox new (after scale):{0}'.format(compmap.extent().toString()), DLG_CAPTION) #add ORTHO after new extent -> performance @@ -223,7 +223,7 @@ def export_all_features(self): if cntr > 0: printer.newPage() self.__reorder_layers() - self.__update_composer_items(thema.name, layers=layers) + self.__update_composer_items(thema.name, subthema=sub_thema.name, layers=layers) composition.renderPage(pdf_painter, 0) QgsMapLayerRegistry.instance().removeMapLayers([lyr.id() for lyr in layers]) cntr += 1 @@ -243,7 +243,7 @@ def export_all_features(self): str_flaechen += u'{0}{1} ({2:.2f}m²)'.format(comma, gnr, stats[0].flaeche) idx += 1 lbls = self.__get_items(QgsComposerLabel, self.comp_textinfo) - self.__update_composer_items('', lbls, str_flaechen) + self.__update_composer_items('', labels=lbls, gnrflaeche=str_flaechen) html = tabelle.text() html += u'' #gnrcnt = 0 @@ -379,7 +379,7 @@ def __get_thema_by_layername(self, lyrname): return subthema return None - def __update_composer_items(self, oberthema, labels=None, gnrflaeche=None, layers=None): + def __update_composer_items(self, oberthema, subthema=None, labels=None, gnrflaeche=None, layers=None): if labels is None: labels = self.comp_lbl for leg in self.comp_leg: @@ -407,6 +407,8 @@ def __update_composer_items(self, oberthema, labels=None, gnrflaeche=None, layer for lbl in labels: txt = lbl[1].replace('[Gemeindename]', self.gem_name) txt = txt.replace('[Oberthema]', oberthema) + if not subthema is None: + txt = txt.replace('[Subthema]', subthema) txt = txt.replace('[GNR]', ', '.join(self.gnrs)) if not gnrflaeche is None: txt = txt.replace('[GNRFLAECHE]', gnrflaeche) @@ -564,8 +566,10 @@ def __read_template(self, textinfo=False): filename = self.template_qpt if VRP_DEBUG is True: QgsMessageLog.logMessage(u'reading template: {0}'.format(filename), DLG_CAPTION) xml_file = QFile(filename) + #if xml_file.exists() is False: + # return u'\nTemplate ist nicht vorhanden!\n\n{0}'.format(self.template_qpt), None if xml_file.open(QIODevice.ReadOnly) is False: - return u'Konnte Template nicht öffnen!\n{0}'.format(self.template_qpt), None + return u'\nKonnte Template nicht öffnen!\n\n{0}\n\n{1}: {2}'.format(filename, xml_file.error(), xml_file.errorString()), None xml_doc = QDomDocument('mydoc') xml_doc.setContent(xml_file) return None, xml_doc diff --git a/plugins.xml b/plugins.xml index 23c86b0..fb491d4 100644 --- a/plugins.xml +++ b/plugins.xml @@ -1,8 +1,8 @@ - + - 0.1.1 + 0.1.2 2.0.0 2.99.0 https://github.com/BergWerkGIS/VoGIS-Raumplanung/ diff --git a/vogisraumplanungplot.zip b/vogisraumplanungplot.zip index ac0def7..5da5224 100644 Binary files a/vogisraumplanungplot.zip and b/vogisraumplanungplot.zip differ