Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eric Duminil
RegionChooser
Commits
652df34d
Commit
652df34d
authored
Oct 19, 2022
by
Eric Duminil
Browse files
Show how many buildings have been extracted.
parent
533350b6
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/java/eu/simstadt/regionchooser/RegionChooserBrowser.java
View file @
652df34d
...
...
@@ -98,7 +98,7 @@ public Integer call() throws IOException, XPathParseException, NavException, Par
downloadTask
.
setOnRunning
(
e
->
jsApp
.
call
(
"downloadStart"
));
downloadTask
.
setOnSucceeded
(
e
->
jsApp
.
call
(
"downloadFinished"
));
downloadTask
.
setOnSucceeded
(
e
->
jsApp
.
call
(
"downloadFinished"
,
e
.
getSource
().
getValue
()
));
new
Thread
(
downloadTask
).
start
();
}
...
...
src/main/java/eu/simstadt/regionchooser/RegionExtractor.java
View file @
652df34d
...
...
@@ -88,7 +88,7 @@ static int selectRegionDirectlyFromCityGML(String wktPolygon, String srsName, Wr
LOGGER
.
warning
(
"No building found in the selected region."
);
}
LOGGER
.
info
(
"Buildings found in selected region "
+
foundBuildingsCount
);
LOGGER
.
info
(
"Buildings found in selected region
:
"
+
foundBuildingsCount
);
//NOTE: This could be a problem if header starts with <core:CityModel> and footer ends with </CityModel>
sb
.
append
(
citygml
.
getFooter
());
return
foundBuildingsCount
;
...
...
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
View file @
652df34d
...
...
@@ -246,13 +246,17 @@ const regionChooser = (function(){
publicScope
.
downloadStart
=
function
(){
document
.
getElementById
(
"
download_region_button
"
).
disabled
=
true
;
document
.
documentElement
.
className
=
'
wait
'
;
dataPanel
.
prepend
(
"
<h2 id='download_start' class='ok'>Starting to extract region.</h2><br/>
\n
"
);
dataPanel
.
prepend
(
"
<h2 id='download_start' class='ok'>Starting to extract region.
..
</h2><br/>
\n
"
);
}
publicScope
.
downloadFinished
=
function
(){
publicScope
.
downloadFinished
=
function
(
count
){
document
.
documentElement
.
className
=
''
;
// Stop waiting
document
.
getElementById
(
"
download_start
"
).
remove
();
dataPanel
.
prepend
(
"
<h2 class='ok'>Region has been extracted</h2><br/>
\n
"
);
if
(
count
>
0
){
dataPanel
.
prepend
(
"
<h2 class='ok'>Done! (
"
+
count
+
"
buildings found) </h2><br/>
\n
"
);
}
else
{
dataPanel
.
prepend
(
"
<h2 class='error'>No building has been found in this region</h2><br/>
\n
"
);
}
var
button
=
document
.
getElementById
(
"
download_region_button
"
);
if
(
button
){
// Region might have been modified since download start
button
.
disabled
=
false
;
...
...
@@ -325,6 +329,7 @@ const regionChooser = (function(){
}
finally
{
displayHelp
();
document
.
documentElement
.
className
=
''
;
// Stop waiting
kml_source
.
getFeatures
().
forEach
(
f
=>
refreshStyle
(
f
,
"
original
"
));
draw
.
setActive
(
true
);
drawnLayer
.
getFeatures
().
clear
();
intersections
.
clear
();
...
...
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