Skip to content

Commit

Permalink
scraper and layer info
Browse files Browse the repository at this point in the history
  • Loading branch information
hanshack committed Dec 6, 2023
1 parent 3d7fe1b commit fd6c3f3
Show file tree
Hide file tree
Showing 10 changed files with 85 additions and 44,876 deletions.
6 changes: 5 additions & 1 deletion portal/umweltatlas/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@
"name": "Karten vergleichen",
"glyphicon": "fas fa-equals",
"icon": "bi bi-list"
},
"saveSelection": {
"name": "translate#common:menu.tools.saveSelection",
"icon": "bi-bookmark-check"
}
},
"parcelSearch": {
Expand Down Expand Up @@ -168,7 +172,7 @@
},
{
"id": "basemap_raster_grau",
"visibility": true
"visibility": false
}
]
},
Expand Down
109 changes: 0 additions & 109 deletions portal/umweltatlas/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,112 +68,3 @@
position: fixed;
}

/* layer accordions */
#layer-accordions {
width: 100%; /* Or max-width for a specific size */
}

#layer-accordions input {
display: none;
}

#layer-accordions label {
display: flex;
align-items: center;
padding: 1em;
background-color: #edf8f4;
/* border-bottom: 1px solid #ddd; */
cursor: pointer;
transition: background-color 0.3s;
margin-top: 3px;
}

#layer-accordions label:hover {
background-color: #edf8f4; /* Slightly darker on hover */
}

.accordion-header .header-title {
font-weight: bold;
}

.accordion-header .header-icon {
font-size: 1.5em;
transform: rotate(0); /* Arrow pointing down */
transition: transform 0.3s;
margin-right: 3px;
}

#layer-accordions input:checked + label .header-icon {
transform: rotate(180deg); /* Arrow pointing up when section is open */
}

#layer-accordions .content {
display: none;
padding: 1em;
background-color: #edf8f4; /* White background */
margin-bottom: 2px;
padding-top: 0px;
}

#layer-accordions input:checked + label + .content {
display: block;
}

/* Style for the link inside the content */
/* #layer-accordions .content a {
text-decoration: none;
} */

/* TABs */

#layer-info-title {
padding: 1em;
background-color: #f2f2f2;
margin-top: 3px;
font-weight: bold;
}

.vue-tool-content-body .nav.nav-tabs {
margin-top: 5px;
margin-bottom: 5px;
--bs-nav-tabs-border-width: 0px;
display: flex;
border: 1px solid #cccccc;
/* position: sticky;
top: 0px;
background-color: white;
z-index: 1; */
}

.vue-tool-content-body .nav .nav-item {
--bs-nav-tabs-border-width: 0px;
flex: 1;
}

.vue-tool-content-body .nav .nav-link {
border-right: 1px solid #cccccc;
background-color: #ffffff;
color: #cccccc;
text-align: center;
padding: 10px;
}

.vue-tool-content-body .nav .nav-item .active {
background-color: #1a4435;
color: white !important;
}

#layerinfo-text {
padding: 1em;
}

#layerinfo-text p {
margin: 0px;
}

.bottom-line {
border-bottom: 1px solid #cccccc;
padding-top: 1rem;
padding-bottom: 1rem;
}

11 changes: 11 additions & 0 deletions portal/umweltatlas/resources/img/contact_placeholder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion portal/umweltatlas/resources/services-internet.json
Original file line number Diff line number Diff line change
Expand Up @@ -3838,7 +3838,8 @@
"name": "Leilah Haag",
"tel": "Tel.: +49 30 90139 5270",
"email": "[email protected]"
}
},
"url": "https://fbinter.stadt-berlin.de/fb/wms/senstadt/k01_11_09filter2010"
},
{
"id": "k01_11_01selten2005:1",
Expand Down
41 changes: 30 additions & 11 deletions scraper/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ import services from "./services-internet.js";
import baseMaps from "./baseMaps.js";

import servicesMasterLight from "./services-internet-masterportallight.js";
import missingServices from "./missingServices.js";
services.push(...missingServices);
// import missingServices from "./missingServices.js";
// services.push(...missingServices);
const nameChapterNumberLookup = {};
const servicesWant = [...baseMaps];
const noServices = [];
const missingServices = [];
const fachdaten = {
Ordner: [],
};
Expand All @@ -33,6 +34,8 @@ const unwantedLayers = [
"Hintergrund dig. Karte 1:50.000",
"Kürzel",
"Texte geomorphologischer Einheiten",
"Hintergrund 1:5.000",
"Hintergrundkarte ISU50",
];

const unwantedIds = ["k01_06_07ph2010:2", "k01_06_07ph2010:3"];
Expand Down Expand Up @@ -98,18 +101,24 @@ function eachGroup(subjectGroupLinks) {
},
function (err) {
fs.writeFile(
"./out/done.json",
"./out/configFachdaten.json",
JSON.stringify(fachdaten),
(err) => {
fs.writeFile(
"./out/newservices.json",
"./out/services.json",
JSON.stringify(servicesWant),
(err) => {
fs.writeFile(
"./out/noServices.json",
JSON.stringify(noServices),
(err) => {
console.log("!DONE!");
fs.writeFile(
"./out/missingServices.json",
JSON.stringify(missingServices),
(err) => {
console.log("!DONE!");
}
);
}
);
}
Expand Down Expand Up @@ -318,8 +327,8 @@ function goToEachMap(subSubGroupLinksNames, subSubGroups, eachYearCallback) {
tel: $(".modul-contact .tel").text()
? $(".modul-contact .tel")
.text()
.replaceAll("Tel.:", "")
.trim()
.replaceAll("Tel.: ", "")
: "",
email: $(".modul-contact .email a").attr("href")
? $(".modul-contact .email a")
Expand All @@ -343,12 +352,22 @@ function goToEachMap(subSubGroupLinksNames, subSubGroups, eachYearCallback) {
fachdaten.forEach((d) => {
let service = findServiceById(d.id);
if (!service) {
service = {
// service = {
// id: d.id,
// missing: true,
// name: "missing service",
// };
// console.log("missing service", d.id);

missingServices.push({
id: d.id,
missing: true,
name: "missing service",
};
console.log("missing service", d.id);
infoURL: descriptionLink,
download: downloadLink,
contact: contact,
});

callback();
return;
}

// add csw_url to datasets so meta data is displayed
Expand Down
9 changes: 5 additions & 4 deletions scraper/missingServices.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export default [
{
id: "k01_06_07ph2010:1",
name: "pH-Werte im Oberboden",
},
// {
// id: "k01_06_07ph2010:1",
// name: "pH-Werte im Oberboden",
// },
];

1 change: 0 additions & 1 deletion scraper/out/done.json

This file was deleted.

1 change: 0 additions & 1 deletion scraper/out/newservices.json

This file was deleted.

Loading

0 comments on commit fd6c3f3

Please sign in to comment.