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
57d8730a
Commit
57d8730a
authored
6 months ago
by
Eric Duminil
Browse files
Options
Download
Email Patches
Plain Diff
Allow many parameters, via input file
parent
3449fcf2
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
+17
-4
download_files_from_LGL_BW.py
with
17 additions
and
4 deletions
+17
-4
download_files_from_LGL_BW.py
+
17
-
4
View file @
57d8730a
...
...
@@ -129,14 +129,27 @@ def extract_region(output_dir: Path, location_name: str, wkt: str) -> None:
if
len
(
gml_inputs
)
==
0
:
print
(
"Error: No CityGML found. At least part of the region should be in Baden-Württemberg!"
)
return
params_path
=
output_dir
/
'params.txt'
wkt_path
=
output_dir
/
'region.wkt'
print
(
f
" Extracting
{
output_file
}
."
)
with
open
(
wkt_path
,
'w'
)
as
f
:
f
.
write
(
wkt
)
with
open
(
params_path
,
'w'
)
as
f
:
f
.
write
(
"--input
\n
"
)
f
.
write
(
','
.
join
(
f
"
{
gml
}
"
for
gml
in
gml_inputs
))
f
.
write
(
"
\n
"
)
f
.
write
(
"--output
\n
"
)
f
.
write
(
f
'"
{
output_file
}
"
\n
'
)
f
.
write
(
"--wkt
\n
"
)
f
.
write
(
f
'"
{
wkt_path
}
"
\n
'
)
result
=
subprocess
.
run
([
'java'
,
'-classpath'
,
f
'
{
region_chooser_libs
}
'
,
'eu.simstadt.regionchooser.RegionChooserCLI'
,
'--input'
,
','
.
join
(
str
(
gml
)
for
gml
in
gml_inputs
),
'--output'
,
str
(
output_file
),
'--wkt'
,
'-'
,
f
'@
{
params_path
}
'
],
input
=
wkt
,
text
=
True
,
capture_output
=
True
,
check
=
True
...
...
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