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
RegionChooser
Commits
652df34d
Commit
652df34d
authored
2 years ago
by
Eric Duminil
Browse files
Options
Download
Email Patches
Plain Diff
Show how many buildings have been extracted.
parent
533350b6
master
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/main/java/eu/simstadt/regionchooser/RegionChooserBrowser.java
+1
-1
.../java/eu/simstadt/regionchooser/RegionChooserBrowser.java
src/main/java/eu/simstadt/regionchooser/RegionExtractor.java
+1
-1
src/main/java/eu/simstadt/regionchooser/RegionExtractor.java
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
+8
-3
...stadt/regionchooser/website/script/simstadt_openlayers.js
with
10 additions
and
5 deletions
+10
-5
src/main/java/eu/simstadt/regionchooser/RegionChooserBrowser.java
+
1
-
1
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
();
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/eu/simstadt/regionchooser/RegionExtractor.java
+
1
-
1
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
;
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
+
8
-
3
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
();
...
...
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