Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SimStadt
Germany Open-Data CityGML
Commits
1e151f09
Commit
1e151f09
authored
Nov 03, 2025
by
Eric Duminil
Browse files
Trying Hessen
parent
b997042b
Changes
1
Hide whitespace changes
Inline
Side-by-side
07_hessen.py
View file @
1e151f09
# https://gds.hessen.de/INTERSHOP/web/WFS/HLBG-Geodaten-Site/de_DE/-/EUR/ViewDownloadcenter-Start?path=3D-Daten/3D-Geb%C3%A4udemodelle/3D-Geb%C3%A4udemodelle%20LoD2
import
json
from
datetime
import
datetime
from
citygml_download
import
TMP_DIR
,
Bundesland
,
CityGMLWithDate
,
download_all_files
,
download_file
SERVER
=
"https://gds.hessen.de"
HESSEN
=
Bundesland
(
"Hessen"
,
source
=
"https://gds.hessen.de/INTERSHOP/rest/WFS/HLBG-Geodaten-Site/-/downloadcenter?path=3D-Daten/3D-Geb%C3%A4udemodelle/3D-Geb%C3%A4udemodelle%20LoD2&navigation=all"
,
info
=
"https://gds.hessen.de/INTERSHOP/web/WFS/HLBG-Geodaten-Site/de_DE/-/EUR/ViewDownloadcenter-Start?path=3D-Daten/3D-Geb%C3%A4udemodelle/3D-Geb%C3%A4udemodelle%20LoD2"
,
)
if
__name__
==
"__main__"
:
local_json_path
=
TMP_DIR
/
"hessen_lod2.json"
download_file
(
HESSEN
.
source
,
local_json_path
)
with
open
(
local_json_path
)
as
json_file
:
data
=
json
.
load
(
json_file
)
citygmls
=
[]
for
kreis_link
in
data
[
'navigation'
]:
if
'LoD2'
in
kreis_link
[
'uri'
]
and
kreis_link
[
'level'
]
==
4
:
kreis_info_json_path
=
TMP_DIR
/
f
"hessen_
{
kreis_link
[
'name'
]
}
.json"
download_file
(
SERVER
+
kreis_link
[
'uri'
],
kreis_info_json_path
)
with
open
(
kreis_info_json_path
)
as
json_file
:
kreis_data
=
json
.
load
(
json_file
)
creation_date
=
kreis_data
[
'searchresult'
][
'packages'
][
0
][
'creationDate'
]
zip_link
=
kreis_data
[
'searchresult'
][
'packages'
][
0
][
'downloadLink'
][
'uri'
]
citygmls
.
append
(
CityGMLWithDate
(
url
=
SERVER
+
zip_link
,
bundesland
=
HESSEN
,
source_date
=
datetime
.
strptime
(
creation_date
,
"%d.%m.%Y"
),
)
)
download_all_files
(
citygmls
,
jobs
=
1
,
sleep
=
20
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment