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
c477b595
Commit
c477b595
authored
Nov 19, 2025
by
Eric Duminil
Browse files
Unused class
parent
dd765087
Changes
2
Hide whitespace changes
Inline
Side-by-side
15_schleswig_holstein.py
View file @
c477b595
# https://geodaten.schleswig-holstein.de/gaialight-sh/_apps/dladownload/single.php?file=LOD2_SH_Massendownload.geojson&id=4
from
citygml_download
import
TMP_DIR
,
Bundesland
,
download_all_files
,
download_file
import
json
from
datetime
import
datetime
from
citygml_download
import
TMP_DIR
,
Bundesland
,
CityGMLWithDate
,
download_all_files
,
download_file
SCHLESWIG_HOLSTEIN
=
Bundesland
(
"Schleswig-Holstein"
,
source
=
"https://geodaten.schleswig-holstein.de/gaialight-sh/_apps/dladownload/single.php?file=LOD2_SH_Massendownload.geojson&id=4"
,
info
=
"https://www.schleswig-holstein.de/DE/landesregierung/ministerien-behoerden/LVERMGEOSH/Service/serviceGeobasisdaten/geodatenService_Geobasisdaten_LoD"
,
license
=
"CC-BY 4.0"
,
kontakt
=
"Vertrieb.Geobasisdaten@LVermGeo.LandSH.de"
kontakt
=
"Vertrieb.Geobasisdaten@LVermGeo.LandSH.de"
,
)
if
__name__
==
"__main__"
:
geojson_path
=
TMP_DIR
/
f
"
{
SCHLESWIG_HOLSTEIN
}
.geojson"
download_file
(
SCHLESWIG_HOLSTEIN
.
source
,
TMP_DIR
/
geojson_path
)
with
open
(
geojson_path
)
as
json_file
:
data
=
json
.
load
(
json_file
)
citygmls
=
[]
crs
=
data
[
"crs"
][
"properties"
][
"name"
]
features
=
data
[
"features"
]
for
feature
in
features
:
properties
=
feature
[
"properties"
]
citygmls
.
append
(
CityGMLWithDate
(
url
=
properties
[
"link_data"
],
bundesland
=
SCHLESWIG_HOLSTEIN
,
source_date
=
datetime
.
strptime
(
properties
[
"datum"
],
"%Y-%m-%d"
),
coordinate_reference_system
=
crs
,
)
)
download_all_files
(
citygmls
)
citygml_download.py
View file @
c477b595
...
...
@@ -276,19 +276,3 @@ class CityGMLWithDate(CityGML):
return
False
return
True
@
dataclass
class
CityGMLWithCustomVerify
(
CityGML
):
"""
CityGML file with custom verification function.
The verify_func should be set after instantiation:
obj = CityGMLWithCustomVerify(...)
obj.verify_func = lambda path: os.path.getsize(path) > 1000
"""
verify_func
:
Callable
[[
Path
],
bool
]
=
lambda
_path
:
False
def
verify
(
self
,
file_path
:
Path
)
->
bool
:
"""Verify file using custom function."""
return
self
.
verify_func
(
file_path
)
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