def add_border_output(self): ''' add layer to visualize drawn border ''' self.output_border = ProjectLayer.from_table( self.borders.table, groupname=self.layer_group, prepend=True) self.output_border.draw( label='Grenze Siedlunskörper', style_file='flaeche_oekologie_grenze_siedlungskoerper.qml' )
def add_fla_layer(self): ''' show family compensation layer ''' self.output = ProjectLayer.from_table(self.gemeinden.table, groupname=self.layer_group) self.output.draw(label='Familienleistungsausgleich', style_file='einnahmen_fam_leistungs_ausgleich.qml', filter="fam_leistungs_ausgleich != 'NULL'", uncheck_siblings=True, redraw=False) self.output.zoom_to()
def add_est_layer(self): ''' show income tax layer ''' self.output = ProjectLayer.from_table(self.gemeinden.table, groupname=self.layer_group) self.output.draw(label='Einkommensteuer', style_file='einnahmen_einkommensteuer.qml', filter="einkommensteuer != 'NULL'", uncheck_siblings=True, redraw=False) self.output.zoom_to()
def add_layer(self): ''' show business tax layer ''' self.output = ProjectLayer.from_table(self.gemeinden.table, groupname=self.layer_group) self.output.draw(label='Gewerbesteuer', style_file='einnahmen_gewerbesteuer.qml', filter="gewerbesteuer != 'NULL'", uncheck_siblings=True, redraw=False) self.output.zoom_to()
def add_gesamt_layer(self): ''' show layer with total changes in tax revenues ''' self.output = ProjectLayer.from_table(self.gemeinden.table, groupname=self.layer_group) self.output.draw(label='Gesamtsumme Einnahmen', style_file='einnahmen_summe_einnahmen.qml', filter="summe_einnahmen != 'NULL'", uncheck_siblings=True, redraw=False) self.output.zoom_to()
def add_ust_layer(self): ''' show value added tax layer ''' self.output = ProjectLayer.from_table(self.gemeinden.table, groupname=self.layer_group) self.output.draw(label='Umsatzsteuer', style_file='einnahmen_umsatzsteuer.qml', filter="umsatzsteuer != 'NULL'", uncheck_siblings=True, redraw=False) self.output.zoom_to()
def add_layer(self, toggle_if_exists=False): ''' show the centers in a layer ''' self.output = ProjectLayer.from_table(self.centers.table, groupname=self.layer_group) self.output.draw(label='Zentren', style_file='standortkonkurrenz_zentren.qml', filter='nutzerdefiniert=1', redraw=not toggle_if_exists, toggle_if_exists=toggle_if_exists) self.select_tool.set_layer(self.output.layer)
def draw_itineraries(self, zoom_to=False): ''' show layer visualizing the itineraries used for determining the transfer nodes ''' self.itinerary_output = ProjectLayer.from_table( self.itineraries.table, groupname=self.layer_group) self.itinerary_output.draw(label='Zulaufstrecken', expanded=False, style_file='verkehr_kuerzeste_Wege.qml') if zoom_to: self.itinerary_output.zoom_to()
def add_layer(self, toggle_if_exists=False): ''' show layer with migration of jobs ''' self.output = ProjectLayer.from_table(self.wanderung.table, groupname=self.layer_group) self.output.draw(label='Wanderungssalden Beschäftigte', style_file='einnahmen_beschaeftigtenwanderung.qml', uncheck_siblings=True, redraw=not toggle_if_exists, toggle_if_exists=toggle_if_exists) if self.output.tree_layer.isVisible(): self.output.zoom_to()
def jobs_table(self): ''' show job development in a table a dialog ''' areas = self.get_job_areas() if not areas: return output = ProjectLayer.from_table( ApProJahr.get_table(), groupname=self.layer_group) layer = output.draw(label='Arbeitsplätze insgesamt nach Jahr') table_config = layer.attributeTableConfig() table_config.setSortExpression('"id_teilflaeche" || "jahr"') layer.setAttributeTableConfig(table_config) utils.iface.showAttributeTable(layer) output = ProjectLayer.from_table( Gewerbeanteile.get_table(), groupname=self.layer_group) layer = output.draw(label='Branchenanteile') table_config = layer.attributeTableConfig() table_config.setSortExpression('"id_teilflaeche" || "id_branche"') layer.setAttributeTableConfig(table_config) utils.iface.showAttributeTable(layer)
def draw_nodes(self, zoom_to=False): ''' show layer visualizing the transfer nodes ''' self.node_output = ProjectLayer.from_table(self.transfer_nodes.table, groupname=self.layer_group) self.node_output.draw(label='Herkunfts-/Zielpunkte', style_file='verkehr_zielpunkte.qml', prepend=True) self.select_tool.set_layer(self.node_output.layer) self.drag_tool.set_layer(self.node_output.layer) if zoom_to: self.node_output.zoom_to()
def add_layer(self, zoom_to=False, toggle_if_exists=False): ''' add output layer showing markets ''' self.output = ProjectLayer.from_table(self.markets.table, groupname=self.layer_group) self.output.draw(label=self.market_label, style_file=self.layer_style, filter=self.layer_filter, redraw=not toggle_if_exists, toggle_if_exists=toggle_if_exists) self.select_tool.set_layer(self.output.layer) if zoom_to and self.output.tree_layer.isVisible(): self.output.zoom_to()
def draw_traffic(self, zoom_to=False, toggle_if_exists=False): ''' show layer visualizing the additional traffic load ''' output = ProjectLayer.from_table(self.traffic_load.table, groupname=self.layer_group) output.draw(label='Zusätzliche PKW-Fahrten', style_file='verkehr_links_zusaetzliche_PKW-Fahrten.qml', filter=f'trips > 0', toggle_if_exists=toggle_if_exists, redraw=not toggle_if_exists) if zoom_to and output.tree_layer.isVisible(): output.zoom_to()
def inhabitants_table(self): ''' show population development in a table a dialog ''' areas = self.get_residential_areas() if not areas: return output = ProjectLayer.from_table( WohnenProJahr.get_table(), groupname=self.layer_group) layer = output.draw(label='Bewohnerschätzung nach Alter und Jahr') table_config = layer.attributeTableConfig() table_config.setSortExpression( '"id_teilflaeche" || "jahr" || "id_altersklasse"') layer.setAttributeTableConfig(table_config) utils.iface.showAttributeTable(layer)
def show_results(self): ''' show the results from "Projektwirkung" as layers ''' # hide layers messing up the readability of the results study_output = ProjectLayer.find(self.study_group) if study_output: study_output[0].setItemVisibilityChecked(False) nullfall_output = ProjectLayer.find(self.nullfall_group) if nullfall_output: nullfall_output[0].setItemVisibilityChecked(False) group_name = f'{self.layer_group}/{self.results_group}' planfall_markets = self.markets.filter(id_betriebstyp_planfall__gt=0) # check first one only checked = True for market in planfall_markets: if market.id_betriebstyp_nullfall == market.id_betriebstyp_planfall: continue output = ProjectLayer.from_table(self.relations.table, groupname=group_name) layer_name = f'Kaufkraftbindung {market.name} ({market.id})' output.draw(label=layer_name, style_file='standortkonkurrenz_kk_bindung_2.qml', filter=f'id_markt={market.id}', expanded=False, checked=checked) # zoom to first layer if checked: output.zoom_to() checked = False self.markets.filter() output = ProjectLayer.from_table(self.centers.table, groupname=group_name) output.draw( label='Umsatzveränderung der Bestandsmärke nach Zentren', style_file='standortkonkurrenz_umsatzveraenderung_zentren.qml', filter='nutzerdefiniert=1', expanded=False, checked=checked) checked = False output = ProjectLayer.from_table(self.centers.table, groupname=group_name) output.draw( label='Umsatzveränderung der Bestandsmärke nach Gemeinde/Verw-Gem.', style_file='standortkonkurrenz_umsatzveraenderung_vwg.qml', filter='nutzerdefiniert=-1 and auswahl!=0', expanded=False, checked=checked) output = ProjectLayer.from_table(self.centers.table, groupname=group_name) output.draw(label='Zentralität im Nullfall nach Gemeinde/Verw-Gem.', style_file='standortkonkurrenz_zentralitaet_nullfall.qml', filter='nutzerdefiniert=-1 and auswahl!=0', expanded=False, checked=checked) output = ProjectLayer.from_table(self.centers.table, groupname=group_name) output.draw(label='Zentralität im Planfall nach Gemeinde/Verw-Gem.', style_file='standortkonkurrenz_zentralitaet_planfall.qml', filter='nutzerdefiniert=-1 and auswahl!=0', expanded=False, checked=checked) output = ProjectLayer.from_table(self.centers.table, groupname=group_name) output.draw( label='Veränderung der Zentralität im Planfall gegenüber Nullfall', style_file='standortkonkurrenz_entwicklung_zentralitaet.qml', filter='nutzerdefiniert=-1 and auswahl!=0', expanded=False, checked=checked) output = ProjectLayer.from_table(self.centers.table, groupname=group_name) output.draw( label='Verkaufsflächendichte im Nullfall', style_file='standortkonkurrenz_verkaufsflaechendichte_nullfall.qml', filter='nutzerdefiniert=-1 and auswahl!=0', expanded=False, checked=checked) output = ProjectLayer.from_table(self.centers.table, groupname=group_name) output.draw( label='Verkaufsflächendichte im Planfall', style_file='standortkonkurrenz_verkaufsflaechendichte_planfall.qml', filter='nutzerdefiniert=-1 and auswahl!=0', expanded=False, checked=checked) output = ProjectLayer.from_table(self.centers.table, groupname=group_name) output.draw(label='Veränderung der Verkaufsflächendichte im Planfall ' 'gegenüber Nullfall', style_file='standortkonkurrenz_entwicklung_' 'verkaufsflaechendichte.qml', filter='nutzerdefiniert=-1 and auswahl!=0', expanded=False, checked=checked)