Commit 99103b53 authored by Eric Duminil's avatar Eric Duminil
Browse files

Notes and warnings.

parent 174696f3
......@@ -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;
......
......@@ -69,7 +69,7 @@ var regionChooser = (function(){
dataPanel.append('.');
srsName = feature.get("srsName");
if (proj4.defs(srsName) === undefined){
console.warning(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.warning("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.warning = function(message){
console.warn = function(message){
fxapp.warning(message);
}
}
......@@ -411,7 +411,7 @@ var regionChooser = (function(){
return;
}
catch (ex) {
console.warning("Copy to clipboard failed.", ex);
console.warn("Copy to clipboard failed.", ex);
return prompt("Copy to clipboard: Ctrl+C, Enter", text);
}
finally {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment