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
6dd147e1
Commit
6dd147e1
authored
Nov 28, 2025
by
Eric Duminil
Browse files
Relative to absolute, if needed
parent
1f2dd799
Changes
1
Show whitespace changes
Inline
Side-by-side
georss_download.py
View file @
6dd147e1
import
xml.etree.ElementTree
as
ET
import
xml.etree.ElementTree
as
ET
from
datetime
import
datetime
from
datetime
import
datetime
from
urllib.parse
import
urljoin
from
citygml_download
import
TMP_DIR
,
Bundesland
,
download_file
from
citygml_download
import
TMP_DIR
,
Bundesland
,
download_file
from
zipfile_download
import
ZipFile
from
zipfile_download
import
ZipFile
...
@@ -23,8 +24,8 @@ def parse_atom_georss(bundesland: Bundesland) -> list[ZipFile]:
...
@@ -23,8 +24,8 @@ def parse_atom_georss(bundesland: Bundesland) -> list[ZipFile]:
raise
ValueError
(
"No date has been found"
)
raise
ValueError
(
"No date has been found"
)
source_date
=
datetime
.
strptime
(
updated_date
,
"%Y-%m-%dT%H:%M:%SZ"
)
source_date
=
datetime
.
strptime
(
updated_date
,
"%Y-%m-%dT%H:%M:%SZ"
)
for
file_elem
in
root
.
findall
(
"atom:entry/atom:link"
,
ns
):
for
file_elem
in
root
.
findall
(
"atom:entry/atom:link"
,
ns
):
# FIXME: href can be relative too. To what?
href
=
file_elem
.
attrib
[
"href"
]
href
=
file_elem
.
attrib
[
"href"
]
href
=
urljoin
(
bundesland
.
source
,
href
)
# TODO: Check if source_date is specified for each ZipFile
# TODO: Check if source_date is specified for each ZipFile
if
href
.
endswith
(
".zip"
):
if
href
.
endswith
(
".zip"
):
zip_files
.
append
(
zip_files
.
append
(
...
...
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