Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to always add real estate geometry in XML extract #1619

Merged
merged 2 commits into from
Dec 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion dev/config/pyramid_oereb.yml.mako
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pyramid_oereb:
# Configuration for XML2PDF print service
renderer: pyramid_oereb.contrib.print_proxy.xml_2_pdf.xml_2_pdf.Renderer
# Define whether all geometry data must be included when sending the data to the print service
with_geometry: True
with_geometry: False
# Base URL with application of the print server
base_url: https://oereb-dev.gis-daten.ch/oereb/report/create
token: 24ba4328-a306-4832-905d-b979388d4cab
Expand Down Expand Up @@ -175,6 +175,9 @@ pyramid_oereb:
# Configuration option for full extract: apply SLD on land register WMS (defaults to true)
full_extract_use_sld: true

# Configuration option for always outputting real estate geometry in XML extract
# xml_extract_use_real_estate_geometry: true

# Configuration for OEREBlex
oereblex:
# OEREBlex host
Expand Down
6 changes: 6 additions & 0 deletions pyramid_oereb/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1235,6 +1235,12 @@ def get_real_estate_type_config():

return Config._config.get('real_estate_type')

@staticmethod
def get_xml_extract_use_real_estate_geometry():
assert Config._config is not None

return Config._config.get('xml_extract_use_real_estate_geometry')

@staticmethod
def get_plan_for_land_register_main_page_config():
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from pyramid_oereb import Config

real_estate_type = Config.get_real_estate_type_by_data_code(real_estate.type)
real_estate_with_geometry = Config.get_xml_extract_use_real_estate_geometry()
%>
<data:RealEstate>
%if real_estate.number:
Expand Down Expand Up @@ -31,7 +32,7 @@
<data:MetadataOfGeographicalBaseData>${real_estate.metadata_of_geographical_base_data | x}</data:MetadataOfGeographicalBaseData>
%endif
<data:LandRegistryArea>${int(real_estate.land_registry_area)}</data:LandRegistryArea>
%if extract.real_estate.limit and params.with_geometry:
%if extract.real_estate.limit and (params.with_geometry or real_estate_with_geometry):
<data:Limit>
<geometry:surface>
%for polygon in real_estate.limit.geoms:
Expand Down