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
99103b53
Commit
99103b53
authored
2 years ago
by
Eric Duminil
Browse files
Options
Download
Email Patches
Plain Diff
Notes and warnings.
parent
174696f3
master
develop
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/eu/simstadt/regionchooser/RegionExtractor.java
+7
-1
src/main/java/eu/simstadt/regionchooser/RegionExtractor.java
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
+4
-4
...stadt/regionchooser/website/script/simstadt_openlayers.js
with
11 additions
and
5 deletions
+11
-5
src/main/java/eu/simstadt/regionchooser/RegionExtractor.java
+
7
-
1
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
;
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
+
4
-
4
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
{
...
...
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