-
Notifications
You must be signed in to change notification settings - Fork 2
Soil Contamination Report
The Soil Contamination Report (a.k.a. "Jordforureningsattest") is a web site that offers access to soil contamination information on any Parcel registered in DKJord.
In order to generate a report, you need to insert parcel information into a fixed URL format as shown below.
The report contacts several external services in order to create the final output. If any of the external services are down, the report will fail and show an error messages. The external services being contacted are:
- https://services.datafordeler.dk/Dkskaermkort/topo_skaermkort/1.0.0/wms
- https://api.dataforsyningen.dk/service
- https://arealinformation.test.miljoeportal.dk/gis/services/DAIdb/MapServer/WFSServer
The report consists of several sections that draw upon information from the Parcel and the Locations and Status Declarations (pollution areas) that are the background data that decided a Parcel's pollution status. Status Declarations are extracted in two different ways in the report, depending on the context in which they are to be used:
- All Status Declarations refer to the total array of Status Declarations (and geometries thereof) which are supplied to DKJord from the Regions as part of the Location objects.
- Relevant Status Declarations are subsets of All Status Declarations that Regions have specifically related to a Parcel as being the ones relevant for the final conclusion of the Parcel's Pollution and Nuance Status. We will go through each section below to explain how the information of the report was derived.
Hardcoded information with description of what data the report shows and how it was generated.
Shows the parcel's information found with the provided elav and matrnr values of URL:
- Ejerlavsnavn (Cadastral district name).
- Matrikelnumme (Land parcel identifier).
- Region (Region name).
- Kommune (Municipality name).
- Analysedato (Recalculation date - dd/mm/yyyy).
The text above the map is hardcoded. The map itself is generated through contacting various services:
- The background map is from Datafordeler.
- The parcel shape is extracted from Dataforsyningen based on elav and matrnr values of URL
- The pollution areas shown on the map in the vicinity of the parcel are from All Status Declarations (meaning they are not only the ones specifically relevant to the Parcel but also others close by)
- The two map shapes in UI called "Påbud - Aktiv" and "Påbud - længerevarende vilkår" are from the theme OMR_PAABUD in DAI WFS.
The map image is generated through several steps:
- The Parcel shape is collected from Dataforsyningen using the elav and matrnr variables.
- Using the Shape, the system calculates a Bounding Box that covers an area around the Parcel area, with a little buffering.
- The Bounding Box is sent to Datafordeler to generate a background image.
- The Parcel shape (border lines) is converted to an overlay image.
- We will query the DKJord database to get shapes for all All Status Declarations within the Bounding Box that are tagged to be one of the various relevant statuses ("Udgået Efter Kortlægning", "Udgået Før Kortlægning", "Jordforurening V2", "F0 Nuanceret", "F1 Nuanceret", "F2 Nuanceret", "Jordforurening V1", or "Lokaliseret (uafklaret)". These correspond to the mapping you can find in the next Section: Forureningsstatus. They are mapped to All Status Declarations in DKJord database table [dbo].[StatusDeclarationCode] where [CodeType]=1.
- We will query the DAI WFS service to get shapes for "Påbud - Aktiv" and "Påbud - længerevarende vilkår" are from the theme OMR_PAABUD.
- We will convert the shapes from step 5 and 6 above into an image.
- We then merge the images from step 3,4 and 7 into the final shown map.
Next to the map image is inserted a hardcoded "Legend" image that will explain the shapes shown on the map.
This section's first sentence looks at data in the database to find out what the pollution status of the Parcel is :
- If the pollution status code of the parcel is not found in the database it will show the text "Matriklen er ikke kortlagt.".
- If the pollution status code of the parcel is STD00159_V0 (15), it will show the text "Lokaliseret (uafklaret).".
- If the pollution status code of the parcel is STD00159_V1 (7), it will show the text "Kortlagt på vidensniveau 1 efter Jordforureningsloven"+{NX}+"."
- If the pollution status code of the parcel is STD00159_V2 (8), it will show the text "Kortlagt på vidensniveau 2 efter Jordforureningsloven"+{NX}+"."
- If the pollution status code of the parcel is STD00159_V1V2 (13), it will show the text "Kortlagt på vidensniveau 1 og vidensniveau 2 efter Jordforureningsloven."+{NX}+"."
- If the pollution status code of the parcel is STD00159_UFK (16), it will show the text "Udgået før kortlægning.".
- If the pollution status code of the parcel is STD00159_UEK (17), it will show the text "Udgået efter kortlægning.".
"+{NX}+"." IF Parcel.PollutionNuanceStatus=00 {NX}=” uden oplyst nuanceringsstatus” IF Parcel.PollutionNuanceStatus=01 {NX}=” med nuanceringsstatus F0” IF Parcel.PollutionNuanceStatus=02 {NX}=” med nuanceringsstatus F1” IF Parcel.PollutionNuanceStatus=03 {NX}=” med nuanceringsstatus F2” IF Parcel.PollutionNuanceStatus=NULL {NX}=”” (empty string)
The above mentioned status codes refer to Standat codes which can be found via this site: https://dce.au.dk/overvaagning/standat/standatbiblioteket/
The second sentence will show the area classification status of the parcel by calling the DAI WFS to check if the Parcel geometry has overlay with any objects in the OMR_KLASSIFICERING theme (which is updated by municipalities directly via DAI):
- If there is no overlay, it will show "Matriklen er ikke omfattet af områdeklassificering".
- If there is overlay and the analysis code of the OMR_KLASSIFICERING object is 7080, it will show "Matriklen er omfattet af områdeklassificering. Matriklen er ikke fritaget for analysepligt ved jordflytning."
- If there is overlay and the analysis code of the OMR_KLASSIFICERING object is 7082 , it will show "Matriklen er omfattet af områdeklassificering. Matriklen er fritaget for analysepligt ved jordflytning, idet jorden kan kategoriseres som uforurenet (kategori 1)."
- If there is overlay and the analysis code of the OMR_KLASSIFICERING object is 7084 , it will show "Matriklen er omfattet af områdeklassificering. Matriklen er fritaget for analysepligt ved jordflytning, idet jorden kan kategoriseres som lettere forurenet (kategori 2)."
- If there is overlay and the analysis code of the OMR_KLASSIFICERING object has other values than the above, it will show "Matriklen er omfattet af områdeklassificering. Ukendt objekt kode:
analysis code
." - If there is overlay and the analysis code of the OMR_KLASSIFICERING object has more than one value, it will show "Systemet modtager modstridende oplysninger vedrørende eventuel analysefritagelse på den aktuelle matrikel på grund af unøjagtigheder i kortmaterialet. Find kort over den aktuelle matrikel på http://kort.arealinfo.dk// for et overblik vedrørende områdeklassificering."
The third sentence will show the injunction information of the parcel by calling the DAI WFS to check if the Parcel's Relevant Status Declarations have overlay with any objects in the OMR_PAABUD theme (which is updated by municipalities directly via DAI) and which have status on returned object which is "Aktivt påbud" or "Kun længerevarende krav":
- If one or more such objects are found, it will show "Der er på denne matrikel igangværende påbud. Påbuddet er meddelt af kommunen med hjemmel i Jordforureningsloven.".
- If no such objects are found, it will show "Der på denne matrikel ikke igangværende påbud efter jordforureningsloven.".
The last sentence will show "Jordflytninger fra områdeklassificerede og kortlagte arealer skal anmeldes til Kommunen." when the area classification status of the parcel is TRUE and the pollution status code of the parcel is STD00159_V1V2 (13) or STD00159_V2 (8).
Takes the context Parcel's Relevant Status Declarations and looks at what Locations these come from. Each Location gets its own table in the section. Locations are shown by:
- Lokalitetsnummer (Location reference).
- Lokalitetsnavn (Location name).
It will also show all Parcels that have references (via [dbo].[ParcelXStatusDeclaration]) to any of the Status Declarations of the context Location, which basically means, that it will show all Parcels that were also analyzed with the context Parcel within the location.
The Parcel table will display two columns:
- Column 1: Will show the Parcel information by format: {CadastralDistrictName} ", " {LandParcelIdentifier} (Ejerlav+Matrikelnummer)
- Column 2: Will show each Parcel's pollution status in the same way as context parcel's status in Section: Forureningsstatus INCLUDING the {NX} logic!
This section is shown when the pollution status code of the Parcel is STD00159_V1V2 (13) or STD00159_V2 (8). It will then again find all related Locations of the Parcel and look into the information of these Locations regarding their Pollutant Components (found in the DKJord table:[dbo].[PollutantComponent]).
The hardcoded text above the table will show "Der er på lokaliteten fundet følgende stoffer der har givet anledning til kortlægningen som forurenet:".
The detailed table will in column headers show series of "Pollutant Component Types" (STD00019 from Standat) and in row headers show series of "Polluted Medium" (STD00158 from Standat). Any pollutant component found in one or more of the Parcel's related Locations will be tagged with "Ja" in the table.
This section is shown when the pollution status code of the Parcel is STD00159_V1V2 (13) or STD00159_V1 (7) or STD00159_V2 (8). It will then again find all related Locations of the Parcel and look into the information of these Locations regarding their Industry Activity (found in the DKJord table: [dbo].[PollutionCause]).
The hardcoded text above a detail table will be "Der er registreret nuværende og/eller tidligere følgende erhverv på lokaliteten:".
The detailed table will in column headers show series of "Industry activity" (following Danish Industry Code from https://erst.virk.dk/branchekode/) and the from and to date of when this activity took place on the Location(s).
Shows ongoing injunctions and long-term terms from DAI response if having any.
This section looks at the OMR_PAABUD object returned earlier in this report. The OMR_PAABUD object is an xml string that keeps attributes representing information of ongoing injunctions.
For example:
<?xml version=\"1.0\" encoding=\"utf-8\" ?>
<wfs:FeatureCollection
xmlns:xs=\"http://www.w3.org/2001/XMLSchema\"
xmlns:wfs=\"http://www.opengis.net/wfs/2.0\"
xmlns:gml=\"http://www.opengis.net/gml/3.2\"
xmlns:dmp=\"https://arealinformation.test.miljoeportal.dk/gis/services/DAIdb/MapServer/WFSServer\"
xmlns:xlink=\"http://www.w3.org/1999/xlink\"
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" timeStamp=\"2021-01-14T06:29:51Z\" numberMatched=\"unknown\" numberReturned=\"1\" xsi:schemaLocation=\"http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd https://arealinformation.test.miljoeportal.dk/gis/services/DAIdb/MapServer/WFSServer https://arealinformation.test.miljoeportal.dk/gis/services/DAIdb/MapServer/WFSServer?service=wfs%26version=2.0.0%26request=DescribeFeatureType\">
<wfs:member>
<dmp:PAABUD_JFL gml:id=\"PAABUD_JFL.39\">
<dmp:OBJECTID>39</dmp:OBJECTID>
<dmp:Temakode>2097</dmp:Temakode>
<dmp:Temanavn>Igangværende påbud JFL</dmp:Temanavn>
<dmp:Objekt_id>{796E48DE-8729-41DA-B32C-5ACAC7FB61DB}</dmp:Objekt_id>
<dmp:Version_id>{ADFA7826-CEF4-48B1-8222-DB940F0EE1BF}</dmp:Version_id>
<dmp:Systid_fra>2015-12-11T09:54:00</dmp:Systid_fra>
<dmp:Oprettet>2015-12-11T09:51:14</dmp:Oprettet>
<dmp:Oprindkode>0</dmp:Oprindkode>
<dmp:Oprindelse>Ikke udfyldt</dmp:Oprindelse>
<dmp:Statuskode>0</dmp:Statuskode>
<dmp:Status>Ukendt</dmp:Status>
<dmp:Off_kode>1</dmp:Off_kode>
<dmp:Offentlig>Synlig for alle</dmp:Offentlig>
<dmp:CVR_kode>29189668</dmp:CVR_kode>
<dmp:CVR_navn>Randers Kommune</dmp:CVR_navn>
<dmp:Bruger_id>c5a9914a-b3f4-4924-bb6a-a68061eeb13f</dmp:Bruger_id>
<dmp:DraftStatus>0</dmp:DraftStatus>
<dmp:Dato_start>2015-11-06T22:00:00</dmp:Dato_start>
<dmp:Hjemmel_kode>5</dmp:Hjemmel_kode>
<dmp:Hjemmel>§ 48 - Undersøgelsespåbud</dmp:Hjemmel>
<dmp:Type_kode>0</dmp:Type_kode>
<dmp:Type>Aktivt påbud</dmp:Type>
<dmp:Indeklima></dmp:Indeklima>
<dmp:Kontakt></dmp:Kontakt>
<dmp:Grundvand></dmp:Grundvand>
<dmp:Andre_krav></dmp:Andre_krav>
<dmp:Journalnr>09.08.03-K08-467-15</dmp:Journalnr>
<dmp:Shape>
<gml:MultiSurface gml:id=\"PAABUD_JFL.39.pl\" srsName=\"urn:ogc:def:crs:EPSG::25832\">
<gml:surfaceMember>
<gml:Polygon gml:id=\"PAABUD_JFL.39.pl.0\" srsName=\"urn:ogc:def:crs:EPSG::25832\">
<gml:exterior>
<gml:LinearRing>
<gml:posList>570688.5679000001 6268483.479 570687.2450000001 6268424.7415 570618.4533000002 6268427.3873 570614.2199999997 6268428.181 570613.6908 6268429.7685 570618.1887999997 6268481.362299999 570666.6074999999 6268484.272700001 570688.5679000001 6268483.479</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
</gml:MultiSurface>
</dmp:Shape>
</dmp:PAABUD_JFL>
</wfs:member>
</wfs:FeatureCollection>
From the above xml string, we will a corresponding table as the below one:
The detail table will have many sub sections:
Shows legal basis as {Hjemmel Value} from the note <dmp:Hjemmel> from the OMR_PAABUD xml string above.
Hjemmel | Påbud er meddelt af kommunen med hjemmel i jordforureningslovens {Hjemmel Value} |
---|
Shows content of the long-term terms based on DAI status declaration status from the node <dmp:Type>.
If the status is "Aktivt påbud":
Indhold af længerevarende vilkår | Påbuddet er aktivt, der er endnu ikke fastsat længerevarende vilkår |
---|
Else if the status "Kun længerevarende krav". The detail content will include statements from the indoor climate (<dmp:Indeklima>), the contact (<dmp:Kontakt>), the groundwater(<dmp:Grundvand>) and other requirements(<dmp:Andre_krav>).
For example:
Indhold af længerevarende vilkår | Påbuddet fastsætter længerevarende vilkår til beskyttelse af indeklima, der forsat skal efterleves... |
---|
Shows {journal number} from the node <dmp:Journalnr>.
If the journal number is found:
Kommunens journalnr. for sagen | {journal number} |
---|
Else there will be a default text as ”Der er ikke oplyst et journalnummer” like the one below:
Kommunens journalnr. for sagen | Der er ikke oplyst et journalnummer |
---|
Shows the start date of the injunctions from the node <dmp:Dato_start>
For example:
Dato for påbud | 1/1/1984 |
---|
Shows the date of being partially over from the node <dmp:Dato_delvis_slut> if the status is "Overgået til længerevarende vilkår" For example:
Overgået til længerevarende vilkår | 1/1/1984 |
---|
Else there will be a default text as "ikke relevant" like the one below.
Overgået til længerevarende vilkår | ikke relevant |
---|