Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eric Duminil
RegionChooser
Commits
99103b53
Commit
99103b53
authored
Oct 10, 2022
by
Eric Duminil
Browse files
Notes and warnings.
parent
174696f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/eu/simstadt/regionchooser/RegionExtractor.java
View file @
99103b53
...
...
@@ -48,6 +48,9 @@
static
StringBuilder
selectRegionDirectlyFromCityGML
(
String
wktPolygon
,
String
srsName
,
Path
...
citygmlPaths
)
throws
ParseException
,
XPathParseException
,
NavException
,
IOException
{
//TODO: Should actually write directly to a bufferedwriter
//TODO: Should return the number of found buildings.
int
buildingsCount
=
0
;
int
foundBuildingsCount
=
0
;
StringBuilder
sb
=
new
StringBuilder
();
...
...
@@ -75,13 +78,16 @@ static StringBuilder selectRegionDirectlyFromCityGML(String wktPolygon, String s
LOGGER
.
info
(
"1000 buildings parsed"
);
}
}
}
if
(
citygml
==
null
)
{
throw
new
IllegalArgumentException
(
"There should be at least one citygml"
);
}
if
(
foundBuildingsCount
==
0
)
{
LOGGER
.
warning
(
"No building found in the selected region."
);
}
LOGGER
.
info
(
"Buildings found in selected region "
+
foundBuildingsCount
);
sb
.
append
(
citygml
.
getFooter
());
return
sb
;
...
...
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
View file @
99103b53
...
...
@@ -69,7 +69,7 @@ var regionChooser = (function(){
dataPanel
.
append
(
'
.
'
);
srsName
=
feature
.
get
(
"
srsName
"
);
if
(
proj4
.
defs
(
srsName
)
===
undefined
){
console
.
warn
ing
(
srsName
+
"
isn't defined by Proj4js!
"
)
console
.
warn
(
srsName
+
"
isn't defined by Proj4js!
"
)
}
};
...
...
@@ -246,7 +246,7 @@ var regionChooser = (function(){
fxapp
.
downloadRegionFromCityGMLs
(
sketchAsWKT
(
srsName
),
project
,
citygmlNames
.
join
(
"
;
"
),
srsName
);
dataPanel
.
prepend
(
"
<h2 class='ok'>Done!</h2><br/>
\n
"
);
}
catch
(
e
)
{
console
.
warn
ing
(
"
ERROR :
"
+
e
);
console
.
warn
(
"
ERROR :
"
+
e
);
dataPanel
.
prepend
(
"
<h2 class='error'>Some problem occured!</h2><br/>
\n
"
);
}
var
end
=
new
Date
().
getTime
();
...
...
@@ -327,7 +327,7 @@ var regionChooser = (function(){
fxapp
.
log
(
message
);
}
console
.
warn
ing
=
function
(
message
){
console
.
warn
=
function
(
message
){
fxapp
.
warning
(
message
);
}
}
...
...
@@ -411,7 +411,7 @@ var regionChooser = (function(){
return
;
}
catch
(
ex
)
{
console
.
warn
ing
(
"
Copy to clipboard failed.
"
,
ex
);
console
.
warn
(
"
Copy to clipboard failed.
"
,
ex
);
return
prompt
(
"
Copy to clipboard: Ctrl+C, Enter
"
,
text
);
}
finally
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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