Add ALKIS Flurstückskennzeichen field for direct cadastre links
When an ALKIS identifier is set on a Land record, the button links to ogc-api.nrw.de detail view instead of the imprecise TIM-Online search. Falls back to TIM-Online when no ALKIS number is present. Closes STI-57 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -21,6 +21,7 @@ class LandForm(forms.ModelForm):
|
|||||||
"flur",
|
"flur",
|
||||||
"flurstueck",
|
"flurstueck",
|
||||||
"adresse",
|
"adresse",
|
||||||
|
"alkis_kennzeichen",
|
||||||
# Flächenangaben
|
# Flächenangaben
|
||||||
"groesse_qm",
|
"groesse_qm",
|
||||||
"gruenland_qm",
|
"gruenland_qm",
|
||||||
|
|||||||
18
app/stiftung/migrations/0054_add_alkis_kennzeichen.py
Normal file
18
app/stiftung/migrations/0054_add_alkis_kennzeichen.py
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 5.0.6 on 2026-03-13 21:57
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('stiftung', '0053_geschichte_dokumente_m2m'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='land',
|
||||||
|
name='alkis_kennzeichen',
|
||||||
|
field=models.CharField(blank=True, help_text='z.B. 05300800400030______ — für direkte Verlinkung zum Katasteramt', max_length=30, null=True, verbose_name='ALKIS Flurstückskennzeichen'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -137,6 +137,13 @@ class Land(models.Model):
|
|||||||
adresse = models.CharField(
|
adresse = models.CharField(
|
||||||
max_length=200, null=True, blank=True, verbose_name="Adresse/Ortsangabe"
|
max_length=200, null=True, blank=True, verbose_name="Adresse/Ortsangabe"
|
||||||
)
|
)
|
||||||
|
alkis_kennzeichen = models.CharField(
|
||||||
|
max_length=30,
|
||||||
|
null=True,
|
||||||
|
blank=True,
|
||||||
|
verbose_name="ALKIS Flurstückskennzeichen",
|
||||||
|
help_text="z.B. 05300800400030______ — für direkte Verlinkung zum Katasteramt",
|
||||||
|
)
|
||||||
|
|
||||||
# Flächenangaben
|
# Flächenangaben
|
||||||
groesse_qm = models.DecimalField(
|
groesse_qm = models.DecimalField(
|
||||||
|
|||||||
@@ -25,10 +25,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 text-end">
|
<div class="col-md-4 text-end">
|
||||||
<div class="btn-group" role="group">
|
<div class="btn-group" role="group">
|
||||||
|
{% if land.alkis_kennzeichen %}
|
||||||
|
<a href="https://ogc-api.nrw.de/lika/v1/collections/flurstueck/Items/{{ land.alkis_kennzeichen|urlencode }}"
|
||||||
|
class="btn btn-outline-success" title="Flurstück im Kataster anzeigen" target="_blank" rel="noopener">
|
||||||
|
<i class="fas fa-map-marked-alt me-2"></i>Kataster
|
||||||
|
</a>
|
||||||
|
{% else %}
|
||||||
<a href="https://www.tim-online.nrw.de/tim-online2/?WFS_gemarkung={{ land.gemarkung|urlencode }}&WFS_flur={{ land.flur|urlencode }}&WFS_flurstueck={{ land.flurstueck|urlencode }}"
|
<a href="https://www.tim-online.nrw.de/tim-online2/?WFS_gemarkung={{ land.gemarkung|urlencode }}&WFS_flur={{ land.flur|urlencode }}&WFS_flurstueck={{ land.flurstueck|urlencode }}"
|
||||||
class="btn btn-outline-success" title="TIM-Online NRW öffnen" target="_blank" rel="noopener">
|
class="btn btn-outline-success" title="TIM-Online NRW öffnen" target="_blank" rel="noopener">
|
||||||
<i class="fas fa-map-marked-alt me-2"></i>TIM-Online
|
<i class="fas fa-map-marked-alt me-2"></i>TIM-Online
|
||||||
</a>
|
</a>
|
||||||
|
{% endif %}
|
||||||
<a href="{% url 'stiftung:land_update' land.pk %}" class="btn btn-warning">
|
<a href="{% url 'stiftung:land_update' land.pk %}" class="btn btn-warning">
|
||||||
<i class="fas fa-edit me-2"></i>Bearbeiten
|
<i class="fas fa-edit me-2"></i>Bearbeiten
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -249,10 +249,17 @@
|
|||||||
class="btn btn-sm btn-outline-primary" title="Anzeigen">
|
class="btn btn-sm btn-outline-primary" title="Anzeigen">
|
||||||
<i class="fas fa-eye"></i>
|
<i class="fas fa-eye"></i>
|
||||||
</a>
|
</a>
|
||||||
|
{% if land.alkis_kennzeichen %}
|
||||||
|
<a href="https://ogc-api.nrw.de/lika/v1/collections/flurstueck/Items/{{ land.alkis_kennzeichen|urlencode }}"
|
||||||
|
class="btn btn-sm btn-outline-success" title="Kataster" target="_blank" rel="noopener">
|
||||||
|
<i class="fas fa-map-marked-alt"></i>
|
||||||
|
</a>
|
||||||
|
{% else %}
|
||||||
<a href="https://www.tim-online.nrw.de/tim-online2/?WFS_gemarkung={{ land.gemarkung|urlencode }}&WFS_flur={{ land.flur|urlencode }}&WFS_flurstueck={{ land.flurstueck|urlencode }}"
|
<a href="https://www.tim-online.nrw.de/tim-online2/?WFS_gemarkung={{ land.gemarkung|urlencode }}&WFS_flur={{ land.flur|urlencode }}&WFS_flurstueck={{ land.flurstueck|urlencode }}"
|
||||||
class="btn btn-sm btn-outline-success" title="TIM-Online NRW" target="_blank" rel="noopener">
|
class="btn btn-sm btn-outline-success" title="TIM-Online NRW" target="_blank" rel="noopener">
|
||||||
<i class="fas fa-map-marked-alt"></i>
|
<i class="fas fa-map-marked-alt"></i>
|
||||||
</a>
|
</a>
|
||||||
|
{% endif %}
|
||||||
<a href="{% url 'stiftung:land_update' land.pk %}"
|
<a href="{% url 'stiftung:land_update' land.pk %}"
|
||||||
class="btn btn-sm btn-outline-warning" title="Bearbeiten">
|
class="btn btn-sm btn-outline-warning" title="Bearbeiten">
|
||||||
<i class="fas fa-edit"></i>
|
<i class="fas fa-edit"></i>
|
||||||
|
|||||||
Reference in New Issue
Block a user