Compare commits

...

No commits in common. "2abffa074326e65f140f481e040f54c05b835ce3" and "3020ae2ad0659edb3b645f7d42656e4c6de81a20" have entirely different histories.

122 changed files with 8974 additions and 3 deletions

View File

@ -12,15 +12,22 @@ jobs:
- name: Code holen
uses: actions/checkout@v4
- name: Deployment auf Server
- name: Dateien auf Server kopieren
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
source: "."
target: "/opt/automation-stack/standortplaner"
- name: Deployment auf Server ausführen
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
# Ordner erstellen, falls nicht vorhanden
mkdir -p /opt/automation-stack/standortplaner
cd /opt/automation-stack/standortplaner
# .env Datei mit den Secrets befüllen
@ -29,6 +36,7 @@ jobs:
echo "DB_USER=${{ secrets.DB_USER }}" >> .env
echo "DB_PASSWORD=${{ secrets.DB_PASSWORD }}" >> .env
echo "DB_NAME=${{ secrets.DB_NAME }}" >> .env
echo "DB_SCHEMA=geodaten" >> .env
echo "OIDC_CLIENT_ID=${{ secrets.OIDC_CLIENT_ID }}" >> .env
echo "OIDC_CLIENT_SECRET=${{ secrets.OIDC_CLIENT_SECRET }}" >> .env

12
.gitignore vendored Normal file
View File

@ -0,0 +1,12 @@
node_modules/
.env
backend/node_modules/
backend/check_db.py
backend/check_db.js
backend/check_db2.js
backend/check_db_admin.js
backend/list_tables.js
backend/check_columns.js
backend/setup_db.py
.vscode/
*.log

Binary file not shown.

16
Dockerfile Normal file
View File

@ -0,0 +1,16 @@
# Nutze die stabile Node.js 20 Version auf Alpine-Linux (sehr klein & sicher)
FROM node:20-alpine
WORKDIR /app
# Kopiere die Paketlisten und installiere nur notwendige Produktions-Pakete
COPY package*.json ./
RUN npm install --production
# Kopiere den gesamten restlichen Programmcode in den Container
COPY . .
# Informiere Docker, dass die App auf Port 3000 hört
EXPOSE 3000
# Starte den Node.js Server
CMD ["node", "server.js"]

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 KiB

Binary file not shown.

View File

@ -0,0 +1 @@
UTF-8

BIN
Shapefile/Eigentümer.dbf Normal file

Binary file not shown.

View File

@ -0,0 +1 @@
PROJCS["ETRS_1989_UTM_Zone_32N",GEOGCS["GCS_ETRS_1989",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",9.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]

44
Shapefile/Eigentümer.qmd Normal file
View File

@ -0,0 +1,44 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis version="3.40.10-Bratislava">
<identifier></identifier>
<parentidentifier></parentidentifier>
<language></language>
<type>dataset</type>
<title></title>
<abstract></abstract>
<contact>
<name></name>
<organization></organization>
<position></position>
<voice></voice>
<fax></fax>
<email></email>
<role></role>
</contact>
<links/>
<dates/>
<fees></fees>
<encoding></encoding>
<crs>
<spatialrefsys nativeFormat="Wkt">
<wkt>PROJCRS["ETRS89 / UTM zone 32N",BASEGEOGCRS["ETRS89",ENSEMBLE["European Terrestrial Reference System 1989 ensemble",MEMBER["European Terrestrial Reference Frame 1989"],MEMBER["European Terrestrial Reference Frame 1990"],MEMBER["European Terrestrial Reference Frame 1991"],MEMBER["European Terrestrial Reference Frame 1992"],MEMBER["European Terrestrial Reference Frame 1993"],MEMBER["European Terrestrial Reference Frame 1994"],MEMBER["European Terrestrial Reference Frame 1996"],MEMBER["European Terrestrial Reference Frame 1997"],MEMBER["European Terrestrial Reference Frame 2000"],MEMBER["European Terrestrial Reference Frame 2005"],MEMBER["European Terrestrial Reference Frame 2014"],MEMBER["European Terrestrial Reference Frame 2020"],ELLIPSOID["GRS 1980",6378137,298.257222101,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[0.1]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4258]],CONVERSION["UTM zone 32N",METHOD["Transverse Mercator",ID["EPSG",9807]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",9,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["Scale factor at natural origin",0.9996,SCALEUNIT["unity",1],ID["EPSG",8805]],PARAMETER["False easting",500000,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["(E)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["(N)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Engineering survey, topographic mapping."],AREA["Europe between 6°E and 12°E: Austria; Denmark - onshore and offshore; Germany - onshore and offshore; Italy - onshore and offshore; Norway including Svalbard - onshore and offshore; Spain - offshore."],BBOX[36.53,6,84.01,12.01]],USAGE[SCOPE["Pan-European conformal mapping at scales larger than 1:500,000."],AREA["Europe between 6°E and 12°E and approximately 36°30'N to 84°N."],BBOX[36.53,6,84.01,12.01]],ID["EPSG",25832]]</wkt>
<proj4>+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs</proj4>
<srsid>2105</srsid>
<srid>25832</srid>
<authid>EPSG:25832</authid>
<description>ETRS89 / UTM zone 32N</description>
<projectionacronym>utm</projectionacronym>
<ellipsoidacronym>EPSG:7019</ellipsoidacronym>
<geographicflag>false</geographicflag>
</spatialrefsys>
</crs>
<extent>
<spatial minx="0" miny="0" dimensions="2" minz="0" maxy="0" maxx="0" crs="EPSG:25832" maxz="0"/>
<temporal>
<period>
<start></start>
<end></end>
</period>
</temporal>
</extent>
</qgis>

BIN
Shapefile/Eigentümer.shp Normal file

Binary file not shown.

BIN
Shapefile/Eigentümer.shx Normal file

Binary file not shown.

View File

@ -0,0 +1 @@
UTF-8

Binary file not shown.

View File

@ -0,0 +1 @@
PROJCS["ETRS_1989_UTM_Zone_32N",GEOGCS["GCS_ETRS_1989",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",9.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]

View File

@ -0,0 +1,27 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis version="3.40.10-Bratislava">
<identifier></identifier>
<parentidentifier></parentidentifier>
<language></language>
<type></type>
<title></title>
<abstract></abstract>
<links/>
<dates/>
<fees></fees>
<encoding></encoding>
<crs>
<spatialrefsys nativeFormat="Wkt">
<wkt></wkt>
<proj4></proj4>
<srsid>0</srsid>
<srid>0</srid>
<authid></authid>
<description></description>
<projectionacronym></projectionacronym>
<ellipsoidacronym></ellipsoidacronym>
<geographicflag>false</geographicflag>
</spatialrefsys>
</crs>
<extent/>
</qgis>

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
UTF-8

Binary file not shown.

View File

@ -0,0 +1 @@
PROJCS["ETRS_1989_UTM_Zone_32N",GEOGCS["GCS_ETRS_1989",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",9.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]

View File

@ -0,0 +1,44 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis version="3.40.10-Bratislava">
<identifier></identifier>
<parentidentifier></parentidentifier>
<language></language>
<type></type>
<title></title>
<abstract></abstract>
<contact>
<name></name>
<organization></organization>
<position></position>
<voice></voice>
<fax></fax>
<email></email>
<role></role>
</contact>
<links/>
<dates/>
<fees></fees>
<encoding></encoding>
<crs>
<spatialrefsys nativeFormat="Wkt">
<wkt>PROJCRS["RGSH2020 / UTM zone 32N",BASEGEOGCRS["RGSH2020",DATUM["Sonatrach Reference Frame 2020",ELLIPSOID["GRS 1980",6378137,298.257222101,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",10299]],CONVERSION["UTM zone 32N",METHOD["Transverse Mercator",ID["EPSG",9807]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",9,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["Scale factor at natural origin",0.9996,SCALEUNIT["unity",1],ID["EPSG",8805]],PARAMETER["False easting",500000,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["(E)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["(N)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Oil and gas exploration and production."],AREA["Algeria - east of 6°E (of Greenwich), onshore and offshore."],BBOX[19.6,6,38.8,11.99]],ID["EPSG",22232]]</wkt>
<proj4>+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs</proj4>
<srsid>66925</srsid>
<srid>520006925</srid>
<authid>EPSG:22232</authid>
<description>RGSH2020 / UTM zone 32N</description>
<projectionacronym>utm</projectionacronym>
<ellipsoidacronym>EPSG:7019</ellipsoidacronym>
<geographicflag>false</geographicflag>
</spatialrefsys>
</crs>
<extent>
<spatial minx="0" miny="0" dimensions="2" minz="0" maxy="0" maxx="0" crs="EPSG:22232" maxz="0"/>
<temporal>
<period>
<start></start>
<end></end>
</period>
</temporal>
</extent>
</qgis>

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
UTF-8

BIN
Shapefile/Freileitungen.dbf Normal file

Binary file not shown.

View File

@ -0,0 +1 @@
PROJCS["ETRS_1989_UTM_Zone_32N",GEOGCS["GCS_ETRS_1989",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",9.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]

View File

@ -0,0 +1,44 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis version="3.40.10-Bratislava">
<identifier></identifier>
<parentidentifier></parentidentifier>
<language></language>
<type>dataset</type>
<title></title>
<abstract></abstract>
<contact>
<name></name>
<organization></organization>
<position></position>
<voice></voice>
<fax></fax>
<email></email>
<role></role>
</contact>
<links/>
<dates/>
<fees></fees>
<encoding></encoding>
<crs>
<spatialrefsys nativeFormat="Wkt">
<wkt>PROJCRS["RGSH2020 / UTM zone 32N",BASEGEOGCRS["RGSH2020",DATUM["Sonatrach Reference Frame 2020",ELLIPSOID["GRS 1980",6378137,298.257222101,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",10299]],CONVERSION["UTM zone 32N",METHOD["Transverse Mercator",ID["EPSG",9807]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",9,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["Scale factor at natural origin",0.9996,SCALEUNIT["unity",1],ID["EPSG",8805]],PARAMETER["False easting",500000,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["(E)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["(N)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Oil and gas exploration and production."],AREA["Algeria - east of 6°E (of Greenwich), onshore and offshore."],BBOX[19.6,6,38.8,11.99]],ID["EPSG",22232]]</wkt>
<proj4>+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs</proj4>
<srsid>66925</srsid>
<srid>520006925</srid>
<authid>EPSG:22232</authid>
<description>RGSH2020 / UTM zone 32N</description>
<projectionacronym>utm</projectionacronym>
<ellipsoidacronym>EPSG:7019</ellipsoidacronym>
<geographicflag>false</geographicflag>
</spatialrefsys>
</crs>
<extent>
<spatial minx="0" miny="0" dimensions="2" minz="0" maxy="0" maxx="0" crs="EPSG:22232" maxz="0"/>
<temporal>
<period>
<start></start>
<end></end>
</period>
</temporal>
</extent>
</qgis>

BIN
Shapefile/Freileitungen.shp Normal file

Binary file not shown.

BIN
Shapefile/Freileitungen.shx Normal file

Binary file not shown.

View File

@ -0,0 +1 @@
UTF-8

BIN
Shapefile/WEA_Standorte.dbf Normal file

Binary file not shown.

View File

@ -0,0 +1 @@
PROJCS["ETRS_1989_UTM_Zone_32N",GEOGCS["GCS_ETRS_1989",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",9.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]

View File

@ -0,0 +1,44 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis version="3.40.10-Bratislava">
<identifier></identifier>
<parentidentifier></parentidentifier>
<language></language>
<type>dataset</type>
<title></title>
<abstract></abstract>
<contact>
<name></name>
<organization></organization>
<position></position>
<voice></voice>
<fax></fax>
<email></email>
<role></role>
</contact>
<links/>
<dates/>
<fees></fees>
<encoding></encoding>
<crs>
<spatialrefsys nativeFormat="Wkt">
<wkt>PROJCRS["ETRS89 / UTM zone 32N",BASEGEOGCRS["ETRS89",ENSEMBLE["European Terrestrial Reference System 1989 ensemble",MEMBER["European Terrestrial Reference Frame 1989"],MEMBER["European Terrestrial Reference Frame 1990"],MEMBER["European Terrestrial Reference Frame 1991"],MEMBER["European Terrestrial Reference Frame 1992"],MEMBER["European Terrestrial Reference Frame 1993"],MEMBER["European Terrestrial Reference Frame 1994"],MEMBER["European Terrestrial Reference Frame 1996"],MEMBER["European Terrestrial Reference Frame 1997"],MEMBER["European Terrestrial Reference Frame 2000"],MEMBER["European Terrestrial Reference Frame 2005"],MEMBER["European Terrestrial Reference Frame 2014"],MEMBER["European Terrestrial Reference Frame 2020"],ELLIPSOID["GRS 1980",6378137,298.257222101,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[0.1]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4258]],CONVERSION["UTM zone 32N",METHOD["Transverse Mercator",ID["EPSG",9807]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",9,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["Scale factor at natural origin",0.9996,SCALEUNIT["unity",1],ID["EPSG",8805]],PARAMETER["False easting",500000,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["(E)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["(N)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Engineering survey, topographic mapping."],AREA["Europe between 6°E and 12°E: Austria; Denmark - onshore and offshore; Germany - onshore and offshore; Italy - onshore and offshore; Norway including Svalbard - onshore and offshore; Spain - offshore."],BBOX[36.53,6,84.01,12.01]],USAGE[SCOPE["Pan-European conformal mapping at scales larger than 1:500,000."],AREA["Europe between 6°E and 12°E and approximately 36°30'N to 84°N."],BBOX[36.53,6,84.01,12.01]],ID["EPSG",25832]]</wkt>
<proj4>+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs</proj4>
<srsid>2105</srsid>
<srid>25832</srid>
<authid>EPSG:25832</authid>
<description>ETRS89 / UTM zone 32N</description>
<projectionacronym>utm</projectionacronym>
<ellipsoidacronym>EPSG:7019</ellipsoidacronym>
<geographicflag>false</geographicflag>
</spatialrefsys>
</crs>
<extent>
<spatial minx="0" miny="0" dimensions="2" minz="0" maxy="0" maxx="0" crs="EPSG:25832" maxz="0"/>
<temporal>
<period>
<start></start>
<end></end>
</period>
</temporal>
</extent>
</qgis>

BIN
Shapefile/WEA_Standorte.shp Normal file

Binary file not shown.

BIN
Shapefile/WEA_Standorte.shx Normal file

Binary file not shown.

View File

@ -0,0 +1 @@
UTF-8

Binary file not shown.

View File

@ -0,0 +1 @@
PROJCS["ETRS_1989_UTM_Zone_32N",GEOGCS["GCS_ETRS_1989",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",9.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]

View File

@ -0,0 +1,44 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis version="3.40.10-Bratislava">
<identifier></identifier>
<parentidentifier></parentidentifier>
<language></language>
<type>dataset</type>
<title></title>
<abstract></abstract>
<contact>
<name></name>
<organization></organization>
<position></position>
<voice></voice>
<fax></fax>
<email></email>
<role></role>
</contact>
<links/>
<dates/>
<fees></fees>
<encoding></encoding>
<crs>
<spatialrefsys nativeFormat="Wkt">
<wkt>PROJCRS["ETRS89 / UTM zone 32N",BASEGEOGCRS["ETRS89",ENSEMBLE["European Terrestrial Reference System 1989 ensemble",MEMBER["European Terrestrial Reference Frame 1989"],MEMBER["European Terrestrial Reference Frame 1990"],MEMBER["European Terrestrial Reference Frame 1991"],MEMBER["European Terrestrial Reference Frame 1992"],MEMBER["European Terrestrial Reference Frame 1993"],MEMBER["European Terrestrial Reference Frame 1994"],MEMBER["European Terrestrial Reference Frame 1996"],MEMBER["European Terrestrial Reference Frame 1997"],MEMBER["European Terrestrial Reference Frame 2000"],MEMBER["European Terrestrial Reference Frame 2005"],MEMBER["European Terrestrial Reference Frame 2014"],MEMBER["European Terrestrial Reference Frame 2020"],ELLIPSOID["GRS 1980",6378137,298.257222101,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[0.1]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4258]],CONVERSION["UTM zone 32N",METHOD["Transverse Mercator",ID["EPSG",9807]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",9,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["Scale factor at natural origin",0.9996,SCALEUNIT["unity",1],ID["EPSG",8805]],PARAMETER["False easting",500000,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["(E)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["(N)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Engineering survey, topographic mapping."],AREA["Europe between 6°E and 12°E: Austria; Denmark - onshore and offshore; Germany - onshore and offshore; Italy - onshore and offshore; Norway including Svalbard - onshore and offshore; Spain - offshore."],BBOX[36.53,6,84.01,12.01]],USAGE[SCOPE["Pan-European conformal mapping at scales larger than 1:500,000."],AREA["Europe between 6°E and 12°E and approximately 36°30'N to 84°N."],BBOX[36.53,6,84.01,12.01]],ID["EPSG",25832]]</wkt>
<proj4>+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs</proj4>
<srsid>2105</srsid>
<srid>25832</srid>
<authid>EPSG:25832</authid>
<description>ETRS89 / UTM zone 32N</description>
<projectionacronym>utm</projectionacronym>
<ellipsoidacronym>EPSG:7019</ellipsoidacronym>
<geographicflag>false</geographicflag>
</spatialrefsys>
</crs>
<extent>
<spatial minx="179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368" miny="179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368" dimensions="2" minz="0" maxy="-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368" maxx="-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368" crs="EPSG:25832" maxz="0"/>
<temporal>
<period>
<start></start>
<end></end>
</period>
</temporal>
</extent>
</qgis>

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
UTF-8

BIN
Shapefile/Wohnbebauung.dbf Normal file

Binary file not shown.

View File

@ -0,0 +1 @@
PROJCS["ETRS_1989_UTM_Zone_32N",GEOGCS["GCS_ETRS_1989",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",9.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]

View File

@ -0,0 +1,44 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis version="3.40.10-Bratislava">
<identifier></identifier>
<parentidentifier></parentidentifier>
<language></language>
<type>dataset</type>
<title></title>
<abstract></abstract>
<contact>
<name></name>
<organization></organization>
<position></position>
<voice></voice>
<fax></fax>
<email></email>
<role></role>
</contact>
<links/>
<dates/>
<fees></fees>
<encoding></encoding>
<crs>
<spatialrefsys nativeFormat="Wkt">
<wkt>PROJCRS["ETRS89 / UTM zone 32N",BASEGEOGCRS["ETRS89",ENSEMBLE["European Terrestrial Reference System 1989 ensemble",MEMBER["European Terrestrial Reference Frame 1989"],MEMBER["European Terrestrial Reference Frame 1990"],MEMBER["European Terrestrial Reference Frame 1991"],MEMBER["European Terrestrial Reference Frame 1992"],MEMBER["European Terrestrial Reference Frame 1993"],MEMBER["European Terrestrial Reference Frame 1994"],MEMBER["European Terrestrial Reference Frame 1996"],MEMBER["European Terrestrial Reference Frame 1997"],MEMBER["European Terrestrial Reference Frame 2000"],MEMBER["European Terrestrial Reference Frame 2005"],MEMBER["European Terrestrial Reference Frame 2014"],MEMBER["European Terrestrial Reference Frame 2020"],ELLIPSOID["GRS 1980",6378137,298.257222101,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[0.1]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4258]],CONVERSION["UTM zone 32N",METHOD["Transverse Mercator",ID["EPSG",9807]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",9,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["Scale factor at natural origin",0.9996,SCALEUNIT["unity",1],ID["EPSG",8805]],PARAMETER["False easting",500000,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["(E)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["(N)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Engineering survey, topographic mapping."],AREA["Europe between 6°E and 12°E: Austria; Denmark - onshore and offshore; Germany - onshore and offshore; Italy - onshore and offshore; Norway including Svalbard - onshore and offshore; Spain - offshore."],BBOX[36.53,6,84.01,12.01]],USAGE[SCOPE["Pan-European conformal mapping at scales larger than 1:500,000."],AREA["Europe between 6°E and 12°E and approximately 36°30'N to 84°N."],BBOX[36.53,6,84.01,12.01]],ID["EPSG",25832]]</wkt>
<proj4>+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs</proj4>
<srsid>2105</srsid>
<srid>25832</srid>
<authid>EPSG:25832</authid>
<description>ETRS89 / UTM zone 32N</description>
<projectionacronym>utm</projectionacronym>
<ellipsoidacronym>EPSG:7019</ellipsoidacronym>
<geographicflag>false</geographicflag>
</spatialrefsys>
</crs>
<extent>
<spatial minx="179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368" miny="179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368" dimensions="2" minz="0" maxy="-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368" maxx="-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368" crs="EPSG:25832" maxz="0"/>
<temporal>
<period>
<start></start>
<end></end>
</period>
</temporal>
</extent>
</qgis>

BIN
Shapefile/Wohnbebauung.shp Normal file

Binary file not shown.

BIN
Shapefile/Wohnbebauung.shx Normal file

Binary file not shown.

2660
app.js Normal file

File diff suppressed because it is too large Load Diff

5
backend/.env.template Normal file
View File

@ -0,0 +1,5 @@
DB_HOST=87.106.21.21
DB_PORT=5432
DB_NAME=ihre_datenbank
DB_USER=ihr_benutzer
DB_PASSWORD=ihr_passwort

View File

@ -0,0 +1,23 @@
const { Client } = require('pg');
async function check() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
await client.query("ALTER TABLE geodaten.wea_standorte ADD COLUMN IF NOT EXISTS variante VARCHAR(10)");
console.log('Column variante added successfully');
} catch (e) {
console.error(e);
} finally {
await client.end();
}
}
check();

View File

@ -0,0 +1,23 @@
const { Client } = require('pg');
async function check() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
await client.query("ALTER TABLE geodaten.wea_standorte ALTER COLUMN ksf_drehung TYPE DOUBLE PRECISION");
console.log('Changed ksf_drehung to DOUBLE PRECISION');
} catch (e) {
console.error(e);
} finally {
await client.end();
}
}
check();

View File

@ -0,0 +1,36 @@
const { Client } = require('pg');
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
client.connect().then(async () => {
try {
const res = await client.query(`
SELECT
a."VNA", a."GNA", a."FSK",
z.projekt_id IS NOT NULL as is_assigned
FROM geodaten.flaecheneigentuemer_alkis a
LEFT JOIN geodaten.flaecheneigentuemer_alkis_zuweisung z ON a."FSK" = z.fsk
LIMIT 20
`);
console.table(res.rows);
const summary = await client.query(`
SELECT
count(*) as total,
count(z.fsk) as assigned
FROM geodaten.flaecheneigentuemer_alkis a
LEFT JOIN geodaten.flaecheneigentuemer_alkis_zuweisung z ON a."FSK" = z.fsk
`);
console.log("Summary:", summary.rows[0]);
} catch (e) {
console.error(e);
} finally {
client.end();
}
});

View File

@ -0,0 +1,28 @@
const { Client } = require('pg');
async function check() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const res = await client.query(`
SELECT column_name, data_type
FROM information_schema.columns
WHERE table_schema = 'wind_projekt_bwscheddebrock' AND table_name = 'wea';
`);
console.log("Columns for wind_projekt_bwscheddebrock.wea:");
res.rows.forEach(r => console.log(`${r.column_name}: ${r.data_type}`));
} catch (e) {
console.error("Error:", e);
} finally {
await client.end();
}
}
check();

View File

@ -0,0 +1,23 @@
const { Client } = require('pg');
async function check() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const res = await client.query("SELECT column_name FROM information_schema.columns WHERE table_schema = 'geodaten' AND table_name = 'wea_standorte'");
console.log(res.rows);
} catch (e) {
console.error(e);
} finally {
await client.end();
}
}
check();

View File

@ -0,0 +1,24 @@
const { Client } = require('pg');
async function check() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const res = await client.query("SELECT * FROM geodaten.wea_standorte");
console.log(`Found ${res.rowCount} rows.`);
console.log(res.rows);
} catch (e) {
console.error(e);
} finally {
await client.end();
}
}
check();

28
backend/check_default.js Normal file
View File

@ -0,0 +1,28 @@
const { Client } = require('pg');
async function check() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const res = await client.query(`
SELECT column_name, column_default
FROM information_schema.columns
WHERE table_schema = 'geodaten' AND table_name = 'flaecheneigentuemer_status'
AND column_name = 'id';
`);
console.log("Default for id:", res.rows[0].column_default);
} catch (e) {
console.error("Error:", e);
} finally {
await client.end();
}
}
check();

26
backend/check_entries.js Normal file
View File

@ -0,0 +1,26 @@
const { Client } = require('pg');
async function check() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const res = await client.query(`
SELECT * FROM geodaten.wea_standorte;
`);
console.log("Entries in geodaten.wea_standorte:");
console.log(JSON.stringify(res.rows, null, 2));
} catch (e) {
console.error("Error:", e);
} finally {
await client.end();
}
}
check();

View File

@ -0,0 +1,28 @@
const { Client } = require('pg');
async function check() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const res = await client.query(`
SELECT table_schema, table_name
FROM information_schema.tables
WHERE table_name ILIKE '%wea%';
`);
console.log("Tables with 'wea' in geodata database:");
res.rows.forEach(r => console.log(`${r.table_schema}.${r.table_name}`));
} catch (e) {
console.error("Error:", e);
} finally {
await client.end();
}
}
check();

View File

@ -0,0 +1,23 @@
const { Client } = require('pg');
async function check() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const res = await client.query("SELECT column_name, column_default FROM information_schema.columns WHERE table_schema = 'geodaten' AND table_name = 'wea_standorte' AND column_name = 'id'");
console.log(res.rows);
} catch (e) {
console.error(e);
} finally {
await client.end();
}
}
check();

View File

@ -0,0 +1,32 @@
const { Client } = require('pg');
async function check() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const res = await client.query(`
SELECT column_name, data_type
FROM information_schema.columns
WHERE table_schema = 'geodaten' AND table_name = 'flaecheneigentuemer_alkis'
`);
console.log("Columns in geodaten.flaecheneigentuemer_alkis:");
console.log(res.rows);
const sample = await client.query('SELECT * FROM geodaten.flaecheneigentuemer_alkis LIMIT 1');
console.log("\nSample row:");
console.log(sample.rows[0]);
} catch (e) {
console.error(e);
} finally {
await client.end();
}
}
check();

View File

@ -0,0 +1,28 @@
const { Client } = require('pg');
async function check() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const res = await client.query(`
SELECT column_name, data_type
FROM information_schema.columns
WHERE table_schema = 'geodaten' AND table_name = 'flaecheneigentuemer_alkis2'
`);
console.log("Columns in geodaten.flaecheneigentuemer_alkis2:");
console.log(res.rows.map(r => r.column_name).join(', '));
} catch (e) {
console.error(e);
} finally {
await client.end();
}
}
check();

View File

@ -0,0 +1,23 @@
const { Client } = require('pg');
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
client.connect().then(async () => {
try {
const res = await client.query('SELECT count(*) FROM geodaten.flaecheneigentuemer_status WHERE projekt_id = \'5bb4e049-85f2-4433-b38e-6a66b81e9f06\'');
console.log('Status count for bw_samern-ohne: ' + res.rows[0].count);
const sample = await client.query('SELECT * FROM geodaten.flaecheneigentuemer_status WHERE projekt_id = \'5bb4e049-85f2-4433-b38e-6a66b81e9f06\' LIMIT 5');
console.log('Sample entries:');
console.table(sample.rows);
} catch (e) {
console.error(e);
} finally {
client.end();
}
});

29
backend/check_projects.js Normal file
View File

@ -0,0 +1,29 @@
const { Client } = require('pg');
async function check() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const res = await client.query(`
SELECT table_schema, table_name
FROM information_schema.tables
WHERE table_name LIKE '%projekt%'
AND table_schema NOT IN ('information_schema', 'pg_catalog');
`);
console.log("Project related tables:");
res.rows.forEach(r => console.log(`${r.table_schema}.${r.table_name}`));
} catch (e) {
console.error("Error:", e);
} finally {
await client.end();
}
}
check();

View File

@ -0,0 +1,25 @@
const { Client } = require('pg');
async function check() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const res = await client.query(`
SELECT * FROM geodaten.flaecheneigentuemer_alkis LIMIT 5;
`);
console.log(JSON.stringify(res.rows, null, 2));
} catch (e) {
console.error("Error:", e);
} finally {
await client.end();
}
}
check();

27
backend/check_srid.js Normal file
View File

@ -0,0 +1,27 @@
const { Client } = require('pg');
async function check() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const res = await client.query(`
SELECT srid FROM geometry_columns
WHERE f_table_schema = 'geodaten' AND f_table_name = 'wea_standorte';
`);
console.log("SRID of geodaten.wea_standorte.geom:");
res.rows.forEach(r => console.log(r.srid));
} catch (e) {
console.error("Error:", e);
} finally {
await client.end();
}
}
check();

View File

@ -0,0 +1,28 @@
const { Client } = require('pg');
async function check() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const res = await client.query(`
SELECT column_name, data_type
FROM information_schema.columns
WHERE table_schema = 'geodaten' AND table_name = 'flaecheneigentuemer_status';
`);
console.log("Columns in flaecheneigentuemer_status:");
res.rows.forEach(r => console.log(`${r.column_name}: ${r.data_type}`));
} catch (e) {
console.error("Error:", e);
} finally {
await client.end();
}
}
check();

24
backend/check_wea.js Normal file
View File

@ -0,0 +1,24 @@
const { Client } = require('pg');
async function check() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const res = await client.query("SELECT column_name, data_type FROM information_schema.columns WHERE table_schema = 'geodaten' AND table_name = 'wea_standorte'");
console.log("Columns in geodaten.wea_standorte:");
console.log(res.rows);
} catch (e) {
console.error(e);
} finally {
await client.end();
}
}
check();

24
backend/cleanup_db.js Normal file
View File

@ -0,0 +1,24 @@
const { Client } = require('pg');
async function clean() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
console.log("Cleaning up test entries...");
const res = await client.query("DELETE FROM geodaten.wea_standorte WHERE projekt_id LIKE '%Test%' OR wea_nummer = 'TEST-1'");
console.log(`Cleaned ${res.rowCount} rows.`);
} catch (e) {
console.error("Error:", e);
} finally {
await client.end();
}
}
clean();

35
backend/fix_db.js Normal file
View File

@ -0,0 +1,35 @@
const { Client } = require('pg');
async function fix() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
// 1. Rename existing GNA if it exists
await client.query('ALTER TABLE geodaten.flaecheneigentuemer_alkis RENAME COLUMN "GNA" TO "OLD_GNA"');
console.log("Renamed GNA to OLD_GNA");
// 2. Rename NOF to GNA
await client.query('ALTER TABLE geodaten.flaecheneigentuemer_alkis RENAME COLUMN "NOF" TO "GNA"');
console.log("Renamed NOF to GNA");
// 3. Add status and notiz
await client.query('ALTER TABLE geodaten.flaecheneigentuemer_alkis ADD COLUMN IF NOT EXISTS status text');
await client.query('ALTER TABLE geodaten.flaecheneigentuemer_alkis ADD COLUMN IF NOT EXISTS notiz text');
console.log("Added status and notiz columns");
} catch (e) {
console.error(e);
} finally {
await client.end();
}
}
fix();

49
backend/fix_view.js Normal file
View File

@ -0,0 +1,49 @@
const { Client } = require('pg');
async function fixView() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const createViewSql = `
CREATE OR REPLACE VIEW geodaten.v_projekt_sicherung AS
SELECT az.projekt_id,
p.name AS projekt_name,
a.id AS alkis_id,
a."FSK" AS fsk,
a."GNA" AS nachname,
a."VNA" AS vorname,
a.bemerkung AS nof_zusatz,
COALESCE(s.status, 'Unbekannt'::text) AS aktueller_status,
s.datum AS status_datum,
r.farbe_hex,
a.geom
FROM geodaten.flaecheneigentuemer_alkis_zuweisung az
JOIN geodaten.flaecheneigentuemer_alkis a ON az.fsk = a."FSK"
JOIN geodaten.projekte p ON az.projekt_id = p.id
LEFT JOIN LATERAL ( SELECT flaecheneigentuemer_status.status,
flaecheneigentuemer_status.datum
FROM geodaten.flaecheneigentuemer_status
WHERE flaecheneigentuemer_status.fsk = az.fsk AND flaecheneigentuemer_status.projekt_id = az.projekt_id
ORDER BY flaecheneigentuemer_status.datum DESC
LIMIT 1) s ON true
LEFT JOIN geodaten.ref_sicherungsstatus r ON s.status = r.status_name;
`;
await client.query(createViewSql);
console.log("View recreated successfully.");
} catch (e) {
console.error(e);
} finally {
await client.end();
}
}
fixView();

31
backend/inspect_alkis.js Normal file
View File

@ -0,0 +1,31 @@
const { Client } = require('pg');
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
client.connect().then(async () => {
try {
console.log("--- Sample from flaecheneigentuemer_alkis ---");
const alkis = await client.query('SELECT "GNA", "VNA", "FSK" FROM geodaten.flaecheneigentuemer_alkis LIMIT 5');
console.log("Keys in result row:", Object.keys(alkis.rows[0]));
console.table(alkis.rows);
console.log("\n--- Sample from flaecheneigentuemer_alkis_zuweisung ---");
const zuweisung = await client.query('SELECT * FROM geodaten.flaecheneigentuemer_alkis_zuweisung LIMIT 5');
console.table(zuweisung.rows);
console.log("\n--- Checking if names match exactly ---");
// Try a name search with LOWER for testing
const nameSearch = await client.query('SELECT count(*) FROM geodaten.flaecheneigentuemer_alkis WHERE "GNA" = $1', [alkis.rows[0].GNA]);
console.log(`Searching for "${alkis.rows[0].GNA}": found ${nameSearch.rows[0].count} entries.`);
} catch (e) {
console.error(e);
} finally {
client.end();
}
});

28
backend/inspect_db.js Normal file
View File

@ -0,0 +1,28 @@
require('dotenv').config({ path: require('path').resolve(__dirname, '../.env') });
const { Client } = require('pg');
const client = new Client({
host: '87.106.21.21',
port: 5432,
database: 'enwelo',
user: 'postgres',
password: process.env.DB_PASSWORD
});
async function run() {
try {
await client.connect();
const res = await client.query(`
SELECT column_name, data_type
FROM information_schema.columns
WHERE table_schema = 'geodaten' AND table_name = 'wea';
`);
console.log(res.rows);
} catch (err) {
console.error(err);
} finally {
await client.end();
}
}
run();

27
backend/inspect_db2.js Normal file
View File

@ -0,0 +1,27 @@
require('dotenv').config();
const postgres = require('postgres');
const sql = postgres({
host: process.env.DB_HOST || '87.106.21.21',
port: process.env.DB_PORT || 5432,
database: process.env.DB_NAME || 'enwelo',
username: process.env.DB_USER || 'postgres',
password: process.env.DB_PASSWORD || ''
});
async function run() {
try {
const res = await sql`
SELECT column_name, data_type
FROM information_schema.columns
WHERE table_schema = 'geodaten' AND table_name = 'wea';
`;
console.log(res);
} catch (err) {
console.error(err);
} finally {
await sql.end();
}
}
run();

View File

@ -0,0 +1,47 @@
const { Client } = require('pg');
async function inspect() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const tables = [
'geodaten.flaecheneigentuemer_alkis',
'geodaten.flaecheneigentuemer_alkis_zuweisung',
'geodaten.flaecheneigentuemer_status'
];
for (const table of tables) {
const [schema, name] = table.split('.');
console.log(`\n--- Structure of ${table} ---`);
const res = await client.query(`
SELECT column_name, data_type, is_nullable
FROM information_schema.columns
WHERE table_schema = $1 AND table_name = $2
ORDER BY ordinal_position;
`, [schema, name]);
res.rows.forEach(r => console.log(`${r.column_name}: ${r.data_type} (${r.is_nullable})`));
}
console.log(`\n--- Views in geodaten ---`);
const viewsRes = await client.query(`
SELECT table_name
FROM information_schema.views
WHERE table_schema = 'geodaten';
`);
viewsRes.rows.forEach(r => console.log(r.table_name));
} catch (e) {
console.error("Error:", e);
} finally {
await client.end();
}
}
inspect();

View File

@ -0,0 +1,32 @@
const { Client } = require('pg');
async function inspect() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const res = await client.query(`
SELECT column_name, data_type, is_nullable
FROM information_schema.columns
WHERE table_schema = 'geodaten' AND table_name = 'projekte'
ORDER BY ordinal_position;
`);
res.rows.forEach(r => console.log(`${r.column_name}: ${r.data_type} (${r.is_nullable})`));
console.log("\nSample data:");
const data = await client.query("SELECT id, name FROM geodaten.projekte LIMIT 5");
data.rows.forEach(r => console.log(`${r.id}: ${r.name}`));
} catch (e) {
console.error("Error:", e);
} finally {
await client.end();
}
}
inspect();

29
backend/inspect_view.js Normal file
View File

@ -0,0 +1,29 @@
const { Client } = require('pg');
async function check() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const res = await client.query(`
SELECT column_name, data_type
FROM information_schema.columns
WHERE table_schema = 'geodaten' AND table_name = 'v_projekt_sicherung'
ORDER BY ordinal_position;
`);
console.log("Columns in v_projekt_sicherung:");
res.rows.forEach(r => console.log(`${r.column_name}: ${r.data_type}`));
} catch (e) {
console.error("Error:", e);
} finally {
await client.end();
}
}
check();

View File

@ -0,0 +1,29 @@
const { Client } = require('pg');
async function check() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const res = await client.query(`
SELECT schemaname, tablename
FROM pg_tables
WHERE schemaname NOT IN ('pg_catalog', 'information_schema')
ORDER BY schemaname, tablename;
`);
console.log("ALL Tables in enwelo database:");
res.rows.forEach(r => console.log(`${r.schemaname}.${r.tablename}`));
} catch (e) {
console.error("Error:", e);
} finally {
await client.end();
}
}
check();

View File

@ -0,0 +1,27 @@
const { Client } = require('pg');
async function check() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const res = await client.query(`
SELECT column_name
FROM information_schema.columns
WHERE table_schema = 'geodaten' AND table_name = 'flaecheneigentuemer_alkis';
`);
console.log(res.rows.map(r => r.column_name).join(', '));
} catch (e) {
console.error("Error:", e);
} finally {
await client.end();
}
}
check();

View File

@ -0,0 +1,28 @@
const { Client } = require('pg');
async function check() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const res = await client.query(`
SELECT table_schema, table_name
FROM information_schema.tables
WHERE table_schema NOT IN ('information_schema', 'pg_catalog');
`);
console.log("Tables in geodata database:");
res.rows.forEach(r => console.log(`${r.table_schema}.${r.table_name}`));
} catch (e) {
console.error("Error:", e);
} finally {
await client.end();
}
}
check();

View File

@ -0,0 +1,28 @@
const { Client } = require('pg');
async function check() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const res = await client.query(`
SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'public';
`);
console.log("Tables in public schema:");
res.rows.forEach(r => console.log(r.table_name));
} catch (e) {
console.error("Error:", e);
} finally {
await client.end();
}
}
check();

View File

@ -0,0 +1,28 @@
const { Client } = require('pg');
async function check() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const res = await client.query(`
SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'wind_tool_standortprüfung';
`);
console.log("Tables in wind_tool_standortprüfung:");
res.rows.forEach(r => console.log(r.table_name));
} catch (e) {
console.error("Error:", e);
} finally {
await client.end();
}
}
check();

View File

@ -0,0 +1,28 @@
const { Client } = require('pg');
async function check() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const res = await client.query(`
SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'wind_tool_trassenplaner';
`);
console.log("Tables in wind_tool_trassenplaner:");
res.rows.forEach(r => console.log(r.table_name));
} catch (e) {
console.error("Error:", e);
} finally {
await client.end();
}
}
check();

999
backend/package-lock.json generated Normal file
View File

@ -0,0 +1,999 @@
{
"name": "backend",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"dependencies": {
"body-parser": "^2.2.2",
"dotenv": "^17.4.2",
"express": "^5.2.1",
"pg": "^8.20.0",
"postgres": "^3.4.9"
}
},
"node_modules/accepts": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz",
"integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==",
"license": "MIT",
"dependencies": {
"mime-types": "^3.0.0",
"negotiator": "^1.0.0"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/body-parser": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.2.tgz",
"integrity": "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==",
"license": "MIT",
"dependencies": {
"bytes": "^3.1.2",
"content-type": "^1.0.5",
"debug": "^4.4.3",
"http-errors": "^2.0.0",
"iconv-lite": "^0.7.0",
"on-finished": "^2.4.1",
"qs": "^6.14.1",
"raw-body": "^3.0.1",
"type-is": "^2.0.1"
},
"engines": {
"node": ">=18"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/express"
}
},
"node_modules/bytes": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
"license": "MIT",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/call-bind-apply-helpers": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
"integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
"license": "MIT",
"dependencies": {
"es-errors": "^1.3.0",
"function-bind": "^1.1.2"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/call-bound": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
"integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
"license": "MIT",
"dependencies": {
"call-bind-apply-helpers": "^1.0.2",
"get-intrinsic": "^1.3.0"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/content-disposition": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.1.0.tgz",
"integrity": "sha512-5jRCH9Z/+DRP7rkvY83B+yGIGX96OYdJmzngqnw2SBSxqCFPd0w2km3s5iawpGX8krnwSGmF0FW5Nhr0Hfai3g==",
"license": "MIT",
"engines": {
"node": ">=18"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/express"
}
},
"node_modules/content-type": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
"integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/cookie": {
"version": "0.7.2",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
"integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/cookie-signature": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz",
"integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==",
"license": "MIT",
"engines": {
"node": ">=6.6.0"
}
},
"node_modules/debug": {
"version": "4.4.3",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
"integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
"license": "MIT",
"dependencies": {
"ms": "^2.1.3"
},
"engines": {
"node": ">=6.0"
},
"peerDependenciesMeta": {
"supports-color": {
"optional": true
}
}
},
"node_modules/depd": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
"integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
"license": "MIT",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/dotenv": {
"version": "17.4.2",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.4.2.tgz",
"integrity": "sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==",
"license": "BSD-2-Clause",
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://dotenvx.com"
}
},
"node_modules/dunder-proto": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
"integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
"license": "MIT",
"dependencies": {
"call-bind-apply-helpers": "^1.0.1",
"es-errors": "^1.3.0",
"gopd": "^1.2.0"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
"license": "MIT"
},
"node_modules/encodeurl": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
"integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
"license": "MIT",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/es-define-property": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
"integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
"license": "MIT",
"engines": {
"node": ">= 0.4"
}
},
"node_modules/es-errors": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
"license": "MIT",
"engines": {
"node": ">= 0.4"
}
},
"node_modules/es-object-atoms": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
"integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
"license": "MIT",
"dependencies": {
"es-errors": "^1.3.0"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/escape-html": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
"license": "MIT"
},
"node_modules/etag": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
"integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/express": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz",
"integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==",
"license": "MIT",
"dependencies": {
"accepts": "^2.0.0",
"body-parser": "^2.2.1",
"content-disposition": "^1.0.0",
"content-type": "^1.0.5",
"cookie": "^0.7.1",
"cookie-signature": "^1.2.1",
"debug": "^4.4.0",
"depd": "^2.0.0",
"encodeurl": "^2.0.0",
"escape-html": "^1.0.3",
"etag": "^1.8.1",
"finalhandler": "^2.1.0",
"fresh": "^2.0.0",
"http-errors": "^2.0.0",
"merge-descriptors": "^2.0.0",
"mime-types": "^3.0.0",
"on-finished": "^2.4.1",
"once": "^1.4.0",
"parseurl": "^1.3.3",
"proxy-addr": "^2.0.7",
"qs": "^6.14.0",
"range-parser": "^1.2.1",
"router": "^2.2.0",
"send": "^1.1.0",
"serve-static": "^2.2.0",
"statuses": "^2.0.1",
"type-is": "^2.0.1",
"vary": "^1.1.2"
},
"engines": {
"node": ">= 18"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/express"
}
},
"node_modules/finalhandler": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz",
"integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==",
"license": "MIT",
"dependencies": {
"debug": "^4.4.0",
"encodeurl": "^2.0.0",
"escape-html": "^1.0.3",
"on-finished": "^2.4.1",
"parseurl": "^1.3.3",
"statuses": "^2.0.1"
},
"engines": {
"node": ">= 18.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/express"
}
},
"node_modules/forwarded": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
"integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/fresh": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz",
"integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==",
"license": "MIT",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/function-bind": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/get-intrinsic": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
"integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
"license": "MIT",
"dependencies": {
"call-bind-apply-helpers": "^1.0.2",
"es-define-property": "^1.0.1",
"es-errors": "^1.3.0",
"es-object-atoms": "^1.1.1",
"function-bind": "^1.1.2",
"get-proto": "^1.0.1",
"gopd": "^1.2.0",
"has-symbols": "^1.1.0",
"hasown": "^2.0.2",
"math-intrinsics": "^1.1.0"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/get-proto": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
"integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
"license": "MIT",
"dependencies": {
"dunder-proto": "^1.0.1",
"es-object-atoms": "^1.0.0"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/gopd": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
"integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
"license": "MIT",
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/has-symbols": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
"integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
"license": "MIT",
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/hasown": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.3.tgz",
"integrity": "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==",
"license": "MIT",
"dependencies": {
"function-bind": "^1.1.2"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/http-errors": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
"integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
"license": "MIT",
"dependencies": {
"depd": "~2.0.0",
"inherits": "~2.0.4",
"setprototypeof": "~1.2.0",
"statuses": "~2.0.2",
"toidentifier": "~1.0.1"
},
"engines": {
"node": ">= 0.8"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/express"
}
},
"node_modules/iconv-lite": {
"version": "0.7.2",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz",
"integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==",
"license": "MIT",
"dependencies": {
"safer-buffer": ">= 2.1.2 < 3.0.0"
},
"engines": {
"node": ">=0.10.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/express"
}
},
"node_modules/inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
"license": "ISC"
},
"node_modules/ipaddr.js": {
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
"integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
"license": "MIT",
"engines": {
"node": ">= 0.10"
}
},
"node_modules/is-promise": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",
"integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==",
"license": "MIT"
},
"node_modules/math-intrinsics": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
"integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
"license": "MIT",
"engines": {
"node": ">= 0.4"
}
},
"node_modules/media-typer": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz",
"integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==",
"license": "MIT",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/merge-descriptors": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz",
"integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==",
"license": "MIT",
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/mime-db": {
"version": "1.54.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz",
"integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mime-types": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz",
"integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==",
"license": "MIT",
"dependencies": {
"mime-db": "^1.54.0"
},
"engines": {
"node": ">=18"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/express"
}
},
"node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"license": "MIT"
},
"node_modules/negotiator": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz",
"integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/object-inspect": {
"version": "1.13.4",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
"integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
"license": "MIT",
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/on-finished": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
"integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
"license": "MIT",
"dependencies": {
"ee-first": "1.1.1"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
"license": "ISC",
"dependencies": {
"wrappy": "1"
}
},
"node_modules/parseurl": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
"license": "MIT",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/path-to-regexp": {
"version": "8.4.2",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.4.2.tgz",
"integrity": "sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==",
"license": "MIT",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/express"
}
},
"node_modules/pg": {
"version": "8.20.0",
"resolved": "https://registry.npmjs.org/pg/-/pg-8.20.0.tgz",
"integrity": "sha512-ldhMxz2r8fl/6QkXnBD3CR9/xg694oT6DZQ2s6c/RI28OjtSOpxnPrUCGOBJ46RCUxcWdx3p6kw/xnDHjKvaRA==",
"license": "MIT",
"peer": true,
"dependencies": {
"pg-connection-string": "^2.12.0",
"pg-pool": "^3.13.0",
"pg-protocol": "^1.13.0",
"pg-types": "2.2.0",
"pgpass": "1.0.5"
},
"engines": {
"node": ">= 16.0.0"
},
"optionalDependencies": {
"pg-cloudflare": "^1.3.0"
},
"peerDependencies": {
"pg-native": ">=3.0.1"
},
"peerDependenciesMeta": {
"pg-native": {
"optional": true
}
}
},
"node_modules/pg-cloudflare": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.3.0.tgz",
"integrity": "sha512-6lswVVSztmHiRtD6I8hw4qP/nDm1EJbKMRhf3HCYaqud7frGysPv7FYJ5noZQdhQtN2xJnimfMtvQq21pdbzyQ==",
"license": "MIT",
"optional": true
},
"node_modules/pg-connection-string": {
"version": "2.12.0",
"resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.12.0.tgz",
"integrity": "sha512-U7qg+bpswf3Cs5xLzRqbXbQl85ng0mfSV/J0nnA31MCLgvEaAo7CIhmeyrmJpOr7o+zm0rXK+hNnT5l9RHkCkQ==",
"license": "MIT"
},
"node_modules/pg-int8": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz",
"integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==",
"license": "ISC",
"engines": {
"node": ">=4.0.0"
}
},
"node_modules/pg-pool": {
"version": "3.13.0",
"resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.13.0.tgz",
"integrity": "sha512-gB+R+Xud1gLFuRD/QgOIgGOBE2KCQPaPwkzBBGC9oG69pHTkhQeIuejVIk3/cnDyX39av2AxomQiyPT13WKHQA==",
"license": "MIT",
"peerDependencies": {
"pg": ">=8.0"
}
},
"node_modules/pg-protocol": {
"version": "1.13.0",
"resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.13.0.tgz",
"integrity": "sha512-zzdvXfS6v89r6v7OcFCHfHlyG/wvry1ALxZo4LqgUoy7W9xhBDMaqOuMiF3qEV45VqsN6rdlcehHrfDtlCPc8w==",
"license": "MIT"
},
"node_modules/pg-types": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz",
"integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==",
"license": "MIT",
"dependencies": {
"pg-int8": "1.0.1",
"postgres-array": "~2.0.0",
"postgres-bytea": "~1.0.0",
"postgres-date": "~1.0.4",
"postgres-interval": "^1.1.0"
},
"engines": {
"node": ">=4"
}
},
"node_modules/pgpass": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz",
"integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==",
"license": "MIT",
"dependencies": {
"split2": "^4.1.0"
}
},
"node_modules/postgres": {
"version": "3.4.9",
"resolved": "https://registry.npmjs.org/postgres/-/postgres-3.4.9.tgz",
"integrity": "sha512-GD3qdB0x1z9xgFI6cdRD6xu2Sp2WCOEoe3mtnyB5Ee0XrrL5Pe+e4CCnJrRMnL1zYtRDZmQQVbvOttLnKDLnaw==",
"license": "Unlicense",
"engines": {
"node": ">=12"
},
"funding": {
"type": "individual",
"url": "https://github.com/sponsors/porsager"
}
},
"node_modules/postgres-array": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz",
"integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==",
"license": "MIT",
"engines": {
"node": ">=4"
}
},
"node_modules/postgres-bytea": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.1.tgz",
"integrity": "sha512-5+5HqXnsZPE65IJZSMkZtURARZelel2oXUEO8rH83VS/hxH5vv1uHquPg5wZs8yMAfdv971IU+kcPUczi7NVBQ==",
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/postgres-date": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz",
"integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==",
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/postgres-interval": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz",
"integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==",
"license": "MIT",
"dependencies": {
"xtend": "^4.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/proxy-addr": {
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
"integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
"license": "MIT",
"dependencies": {
"forwarded": "0.2.0",
"ipaddr.js": "1.9.1"
},
"engines": {
"node": ">= 0.10"
}
},
"node_modules/qs": {
"version": "6.15.1",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.15.1.tgz",
"integrity": "sha512-6YHEFRL9mfgcAvql/XhwTvf5jKcOiiupt2FiJxHkiX1z4j7WL8J/jRHYLluORvc1XxB5rV20KoeK00gVJamspg==",
"license": "BSD-3-Clause",
"dependencies": {
"side-channel": "^1.1.0"
},
"engines": {
"node": ">=0.6"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/range-parser": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/raw-body": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz",
"integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==",
"license": "MIT",
"dependencies": {
"bytes": "~3.1.2",
"http-errors": "~2.0.1",
"iconv-lite": "~0.7.0",
"unpipe": "~1.0.0"
},
"engines": {
"node": ">= 0.10"
}
},
"node_modules/router": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz",
"integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==",
"license": "MIT",
"dependencies": {
"debug": "^4.4.0",
"depd": "^2.0.0",
"is-promise": "^4.0.0",
"parseurl": "^1.3.3",
"path-to-regexp": "^8.0.0"
},
"engines": {
"node": ">= 18"
}
},
"node_modules/safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
"license": "MIT"
},
"node_modules/send": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz",
"integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==",
"license": "MIT",
"dependencies": {
"debug": "^4.4.3",
"encodeurl": "^2.0.0",
"escape-html": "^1.0.3",
"etag": "^1.8.1",
"fresh": "^2.0.0",
"http-errors": "^2.0.1",
"mime-types": "^3.0.2",
"ms": "^2.1.3",
"on-finished": "^2.4.1",
"range-parser": "^1.2.1",
"statuses": "^2.0.2"
},
"engines": {
"node": ">= 18"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/express"
}
},
"node_modules/serve-static": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz",
"integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==",
"license": "MIT",
"dependencies": {
"encodeurl": "^2.0.0",
"escape-html": "^1.0.3",
"parseurl": "^1.3.3",
"send": "^1.2.0"
},
"engines": {
"node": ">= 18"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/express"
}
},
"node_modules/setprototypeof": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
"license": "ISC"
},
"node_modules/side-channel": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
"integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
"license": "MIT",
"dependencies": {
"es-errors": "^1.3.0",
"object-inspect": "^1.13.3",
"side-channel-list": "^1.0.0",
"side-channel-map": "^1.0.1",
"side-channel-weakmap": "^1.0.2"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/side-channel-list": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz",
"integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==",
"license": "MIT",
"dependencies": {
"es-errors": "^1.3.0",
"object-inspect": "^1.13.4"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/side-channel-map": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
"integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
"license": "MIT",
"dependencies": {
"call-bound": "^1.0.2",
"es-errors": "^1.3.0",
"get-intrinsic": "^1.2.5",
"object-inspect": "^1.13.3"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/side-channel-weakmap": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
"integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
"license": "MIT",
"dependencies": {
"call-bound": "^1.0.2",
"es-errors": "^1.3.0",
"get-intrinsic": "^1.2.5",
"object-inspect": "^1.13.3",
"side-channel-map": "^1.0.1"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/split2": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz",
"integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==",
"license": "ISC",
"engines": {
"node": ">= 10.x"
}
},
"node_modules/statuses": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
"integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
"license": "MIT",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/toidentifier": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
"license": "MIT",
"engines": {
"node": ">=0.6"
}
},
"node_modules/type-is": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz",
"integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==",
"license": "MIT",
"dependencies": {
"content-type": "^1.0.5",
"media-typer": "^1.1.0",
"mime-types": "^3.0.0"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/unpipe": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
"integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
"license": "MIT",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/vary": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
"license": "MIT",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
"license": "ISC"
},
"node_modules/xtend": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
"license": "MIT",
"engines": {
"node": ">=0.4"
}
}
}
}

9
backend/package.json Normal file
View File

@ -0,0 +1,9 @@
{
"dependencies": {
"body-parser": "^2.2.2",
"dotenv": "^17.4.2",
"express": "^5.2.1",
"pg": "^8.20.0",
"postgres": "^3.4.9"
}
}

2
backend/requirements.txt Normal file
View File

@ -0,0 +1,2 @@
psycopg2-binary
python-dotenv

View File

@ -0,0 +1,28 @@
const { Client } = require('pg');
async function check() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const res = await client.query(`
SELECT schemaname, matviewname
FROM pg_matviews
WHERE matviewname ILIKE '%wea%';
`);
console.log("Materialized Views with 'wea' in their name:");
res.rows.forEach(r => console.log(`${r.schemaname}.${r.matviewname}`));
} catch (e) {
console.error("Error:", e);
} finally {
await client.end();
}
}
check();

View File

@ -0,0 +1,28 @@
const { Client } = require('pg');
async function check() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const res = await client.query(`
SELECT schemaname, tablename
FROM pg_tables
WHERE tablename ILIKE '%wea%';
`);
console.log("Tables with 'wea' in their name (pg_tables):");
res.rows.forEach(r => console.log(`${r.schemaname}.${r.tablename}`));
} catch (e) {
console.error("Error:", e);
} finally {
await client.end();
}
}
check();

View File

@ -0,0 +1,29 @@
const { Client } = require('pg');
async function check() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const res = await client.query(`
SELECT table_schema, table_name
FROM information_schema.tables
WHERE table_name ILIKE '%wea%'
ORDER BY table_schema, table_name;
`);
console.log("Tables with 'wea' in their name:");
res.rows.forEach(r => console.log(`${r.table_schema}.${r.table_name}`));
} catch (e) {
console.error("Error:", e);
} finally {
await client.end();
}
}
check();

View File

@ -0,0 +1,39 @@
require('dotenv').config({ path: require('node:path').join(__dirname, '../.env') });
const { Client } = require('pg');
async function check() {
const host = process.env.DB_HOST;
const port = Number(process.env.DB_PORT || 5432);
const user = process.env.DB_USER;
const password = process.env.DB_PASSWORD;
const database = process.env.DB_NAME;
if (!host || !password) {
console.error("Missing database environment configuration (DB_HOST, DB_PASSWORD). Please check your .env file.");
return;
}
const client = new Client({
host,
port,
user,
password,
database
});
try {
await client.connect();
const res = await client.query(`
SELECT table_schema, table_name
FROM information_schema.views
WHERE table_name ILIKE '%wea%';
`);
console.log("Views with 'wea' in their name:");
res.rows.forEach(r => console.log(`${r.table_schema}.${r.table_name}`));
} catch (e) {
console.error("Error:", e);
} finally {
await client.end();
}
}
check();

40
backend/test_art.js Normal file
View File

@ -0,0 +1,40 @@
require('dotenv').config({ path: '../.env' });
const { Pool } = require('pg');
const pool = new Pool({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
database: process.env.DB_NAME,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD
});
async function run() {
try {
const res = await pool.query("SELECT column_name, data_type FROM information_schema.columns WHERE table_schema = 'geodaten' AND table_name = 'artennachweis'");
console.log("Columns:", res.rows);
// Test the exact query
const res2 = await pool.query(`SELECT jsonb_build_object(
'type', 'FeatureCollection',
'features', COALESCE(jsonb_agg(features.feature), '[]'::jsonb)
)
FROM (
SELECT jsonb_build_object(
'type', 'Feature',
'geometry', ST_AsGeoJSON(ST_Transform(geom, 4326))::jsonb,
'properties', jsonb_build_object(
'art', art
)
) AS feature
FROM geodaten.artennachweis
) features`);
console.log("Query Success! First few chars of result:", JSON.stringify(res2.rows[0]).substring(0, 100));
} catch (err) {
console.error("Error:", err.message);
} finally {
pool.end();
}
}
run();

44
backend/test_db_insert.js Normal file
View File

@ -0,0 +1,44 @@
const { Client } = require('pg');
async function test_insert() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
console.log("Connected to DB.");
const projekt_id = "BWSamern-Ohne-Test";
const lat = 52.3;
const lng = 7.1;
await client.query('BEGIN');
await client.query('DELETE FROM geodaten.wea_standorte WHERE projekt_id = $1', [projekt_id]);
console.log("Inserting test row...");
await client.query(
`INSERT INTO geodaten.wea_standorte (
wea_nummer, anlagentyp, nabenhoehe, rotordurchmesser, projekt_id, geom
) VALUES ($1, $2, $3, $4, $5, ST_Transform(ST_SetSRID(ST_MakePoint($6, $7), 4326), 25832))`,
['TEST-1', 'Vestas V162', 169, 162, projekt_id, lng, lat]
);
await client.query('COMMIT');
console.log("Insert successful!");
const res = await client.query('SELECT *, ST_AsText(ST_Transform(geom, 4326)) as geom_wgs84 FROM geodaten.wea_standorte WHERE projekt_id = $1', [projekt_id]);
console.log("Verified entry:", JSON.stringify(res.rows, null, 2));
} catch (e) {
console.error("Test failed:", e);
} finally {
await client.end();
}
}
test_insert();

69
backend/test_db_logic.js Normal file
View File

@ -0,0 +1,69 @@
const { Client } = require('pg');
async function testFullLogic() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const vorname = 'Anja';
const nachname = '';
const projekt_name = 'bw_samern-ohne'; // Try the exact DB name or 'BWSamern-Ohne'
console.log(`--- Testing Project Resolution ---`);
const pRes = await client.query(
'SELECT id FROM geodaten.projekte WHERE LOWER(name) = $1 OR LOWER(REPLACE(name, \'-\', \'_\')) = $1',
[projekt_name.toLowerCase().replace(/-/g, '_')]
);
const resolvedPid = pRes.rows.length > 0 ? pRes.rows[0].id : null;
console.log(`Projekt ID für '${projekt_name}':`, resolvedPid);
if (!resolvedPid) return;
console.log(`\n--- Testing ALKIS Search ---`);
const ownerRes = await client.query(
`SELECT "FSK", "VNA", "GNA" FROM geodaten.flaecheneigentuemer_alkis
WHERE ("GNA" = $1 OR ("GNA" IS NULL AND $1 = ''))
AND ("VNA" = $2 OR ("VNA" IS NULL AND $2 = ''))`,
[nachname, vorname]
);
const fsks = ownerRes.rows.map(r => r.FSK);
console.log(`Found ${fsks.length} FSKs for ${vorname} ${nachname}:`, fsks);
if (fsks.length === 0) return;
console.log(`\n--- Testing Zuweisung Check ---`);
let validFsks = [];
for (const fsk of fsks) {
const assignmentRes = await client.query(
`SELECT 1 FROM geodaten.flaecheneigentuemer_alkis_zuweisung WHERE fsk = $1 AND projekt_id = $2`,
[fsk, resolvedPid]
);
console.log(`FSK ${fsk} is assigned to project:`, assignmentRes.rowCount > 0);
if (assignmentRes.rowCount > 0) validFsks.push(fsk);
}
console.log(`\n--- Overall result ---`);
console.log(`If this were the API, it would save ${validFsks.length} statuses.`);
// Also let's check the zuweisung table generally for this project to see how many exist
const allZuw = await client.query(
`SELECT COUNT(*) FROM geodaten.flaecheneigentuemer_alkis_zuweisung WHERE projekt_id = $1`,
[resolvedPid]
);
console.log(`Total FSKs assigned to this project in zuweisung table:`, allZuw.rows[0].count);
} catch (e) {
console.error("Error:", e);
} finally {
await client.end();
}
}
testFullLogic();

24
backend/test_insert.js Normal file
View File

@ -0,0 +1,24 @@
const { Client } = require('pg');
async function check() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const res = await client.query("INSERT INTO geodaten.wea_standorte (projekt_id, wea_nummer, anlagentyp, nabenhoehe, rotordurchmesser, geom) VALUES ($1, $2, $3, $4, $5, ST_Transform(ST_SetSRID(ST_MakePoint($6, $7), 4326), 25832)) RETURNING id",
['BWSamern-Ohne', 'TEST-2', 'Vestas', 160, 160, 7.3, 52.3]);
console.log('Inserted ID:', res.rows[0].id);
} catch (e) {
console.error(e);
} finally {
await client.end();
}
}
check();

View File

@ -0,0 +1,31 @@
const { Client } = require('pg');
async function testInsert() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
await client.query('BEGIN');
const res = await client.query(
`INSERT INTO geodaten.flaecheneigentuemer_status (id, fsk, projekt_id, status, datum)
VALUES (gen_random_uuid(), '034212009000090003__', '5bb4e049-85f2-4433-b38e-6a66b81e9f06', 'Gesichert', NOW()) RETURNING *`
);
console.log("Insert success:", res.rows[0]);
await client.query('ROLLBACK');
console.log("Rollback success");
} catch (e) {
console.error("Insert failed:", e);
} finally {
await client.end();
}
}
testInsert();

47
backend/test_ltg.js Normal file
View File

@ -0,0 +1,47 @@
require('dotenv').config({ path: '../.env' });
const { Pool } = require('pg');
const pool = new Pool({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
database: process.env.DB_NAME,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD
});
async function run() {
try {
const result = await pool.query(
`SELECT jsonb_build_object(
'type', 'FeatureCollection',
'features', COALESCE(jsonb_agg(features.feature), '[]'::jsonb)
)
FROM (
SELECT jsonb_build_object(
'type', 'Feature',
'geometry', ST_AsGeoJSON(ST_Transform(geom, 4326))::jsonb,
'properties', jsonb_build_object(
'art', art,
'spannung', spannung,
'ltg_name', ltg_name,
'bezeichnun', bezeichnun,
'bemerkung', bemerkung,
'status', status,
'quelle', quelle,
'info', info,
'vorschlag', vorschlag
)
) AS feature
FROM geodaten.leitungsverlaeufe
WHERE art ILIKE '%wasserstoff%' OR art ILIKE '%freileitung%'
) features`
);
console.log("Success! Output:", JSON.stringify(result.rows[0]).substring(0, 100));
} catch (err) {
console.error("DB Error:", err.message);
} finally {
pool.end();
}
}
run();

View File

@ -0,0 +1,40 @@
const { Client } = require('pg');
async function testQuery() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const nachname = '';
const vorname = 'Anja';
console.log(`Querying for GNA='${nachname}' AND VNA='${vorname}'`);
const res1 = await client.query(
`SELECT "FSK" FROM geodaten.flaecheneigentuemer_alkis WHERE "GNA" = $1 AND "VNA" = $2`,
[nachname, vorname]
);
console.log(`Found: ${res1.rowCount} rows.`);
console.log(`Querying for (GNA=$1 OR (GNA IS NULL AND $1='')) AND VNA=$2`);
const res2 = await client.query(
`SELECT "FSK" FROM geodaten.flaecheneigentuemer_alkis
WHERE ("GNA" = $1 OR ("GNA" IS NULL AND $1 = ''))
AND ("VNA" = $2 OR ("VNA" IS NULL AND $2 = ''))`,
[nachname, vorname]
);
console.log(`Found: ${res2.rowCount} rows.`);
} catch (e) {
console.error("Error:", e);
} finally {
await client.end();
}
}
testQuery();

View File

@ -0,0 +1,17 @@
const https = require('https');
https.get('https://bw-samern-ohne.enwelo-serverumgebung.cloud/api/sicherung/bw_samern-ohne', (res) => {
console.log('statusCode:', res.statusCode);
let data = '';
res.on('data', (d) => {
data += d;
});
res.on('end', () => {
console.log(data.substring(0, 500));
});
}).on('error', (e) => {
console.error(e);
});

View File

@ -0,0 +1,28 @@
const { Client } = require('pg');
async function testProject() {
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
try {
await client.connect();
const input = 'BWSamern-Ohne';
const normalized = input.toLowerCase().replace(/[-_]/g, '');
const res = await client.query(
'SELECT id FROM geodaten.projekte WHERE LOWER(REPLACE(REPLACE(name, \'-\', \'\'), \'_\', \'\')) = $1',
[normalized]
);
console.log(`Projekt ID für '${input}':`, res.rows.length > 0 ? res.rows[0].id : null);
} catch (e) {
console.error("Error:", e);
} finally {
await client.end();
}
}
testProject();

View File

@ -0,0 +1,31 @@
const { Client } = require('pg');
require('dotenv').config({ path: '../.env' });
const client = new Client({
host: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
async function resolveProjectId(client, input) {
if (!input) return null;
const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
if (uuidRegex.test(input)) return input;
const normalized = input.toLowerCase().replace(/[-_]/g, '');
const res = await client.query('SELECT id FROM geodaten.projekte WHERE LOWER(REPLACE(REPLACE(name, \'-\', \'\'), \'_\', \'\')) = $1', [normalized]);
return res.rows.length > 0 ? res.rows[0].id : null;
}
client.connect().then(async () => {
try {
const pid = await resolveProjectId(client, 'BWSamern-Ohne');
console.log('Resolved PID:', pid);
const res = await client.query('SELECT vorname, nachname, aktueller_status as status FROM geodaten.v_projekt_sicherung WHERE projekt_id = $1 LIMIT 5', [pid]);
console.table(res.rows);
} catch (e) {
console.error(e);
} finally {
client.end();
}
});

Some files were not shown because too many files have changed in this diff Show More