Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eric Duminil
Get Baden-Württemberg CityGML Opendata
Commits
1b63519d
Commit
1b63519d
authored
2 months ago
by
Eric Duminil
Browse files
Options
Download
Email Patches
Plain Diff
Lint
parent
27043c1e
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
download_files_from_LGL_BW.py
+3
-3
download_files_from_LGL_BW.py
with
3 additions
and
3 deletions
+3
-3
download_files_from_LGL_BW.py
+
3
-
3
View file @
1b63519d
...
@@ -55,6 +55,7 @@ UTM = 32
...
@@ -55,6 +55,7 @@ UTM = 32
SCRIPT_DIR
=
Path
(
__file__
).
parent
SCRIPT_DIR
=
Path
(
__file__
).
parent
WAIT_BETWEEN_DOWNLOADS
=
5
# [s] Be nice to LGL Server.
WAIT_BETWEEN_DOWNLOADS
=
5
# [s] Be nice to LGL Server.
GML_GLOB
=
"LoD2_*/LoD2_*.gml"
if
EXTRACT_REGIONS
:
if
EXTRACT_REGIONS
:
try
:
try
:
...
@@ -66,7 +67,6 @@ if EXTRACT_REGIONS:
...
@@ -66,7 +67,6 @@ if EXTRACT_REGIONS:
"
\n
set EXTRACT_REGIONS to False,"
"
\n
set EXTRACT_REGIONS to False,"
"
\n
or set SIMSTADT_FOLDER manually: SIMSTADT_FOLDER = Path('/path/to/SimStadt')"
"
\n
or set SIMSTADT_FOLDER manually: SIMSTADT_FOLDER = Path('/path/to/SimStadt')"
)
)
GML_GLOB
=
"LoD2_*/LoD2_*.gml"
def
coordinates_to_grid
(
longitude
:
float
,
latitude
:
float
)
->
tuple
[
int
,
int
]:
def
coordinates_to_grid
(
longitude
:
float
,
latitude
:
float
)
->
tuple
[
int
,
int
]:
...
@@ -183,8 +183,8 @@ def get_wkt(wkt_or_zipcode: str) -> str:
...
@@ -183,8 +183,8 @@ def get_wkt(wkt_or_zipcode: str) -> str:
"""
"""
if
'POLYGON'
in
wkt_or_zipcode
:
if
'POLYGON'
in
wkt_or_zipcode
:
return
wkt_or_zipcode
return
wkt_or_zipcode
else
:
return
get_coordinates_by_zipcode
(
wkt_or_zipcode
.
split
(
','
))
return
get_coordinates_by_zipcode
(
wkt_or_zipcode
.
split
(
','
))
def
main
(
regions
:
dict
[
str
,
str
])
->
None
:
def
main
(
regions
:
dict
[
str
,
str
])
->
None
:
"""Downloads ZIP files, extracts CityGML files, and selects desired region."""
"""Downloads ZIP files, extracts CityGML files, and selects desired region."""
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Explore
Projects
Groups
Snippets