[mkgmap-splitter] 01/04: Imported Upstream version 0.0.0+svn429
Sebastiaan Couwenberg
sebastic at moszumanska.debian.org
Sat Mar 5 00:39:06 UTC 2016
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch master
in repository mkgmap-splitter.
commit 101893c1c393d7a0f78e8e197c3f060a17ba25c9
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Sat Mar 5 01:22:21 2016 +0100
Imported Upstream version 0.0.0+svn429
---
resources/splitter-version.properties | 4 ++--
src/uk/me/parabola/splitter/DensityMap.java | 21 +++++++++++++--------
.../me/parabola/splitter/DensityMapCollector.java | 2 +-
3 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/resources/splitter-version.properties b/resources/splitter-version.properties
index f7d3a0a..c670dbc 100644
--- a/resources/splitter-version.properties
+++ b/resources/splitter-version.properties
@@ -1,2 +1,2 @@
-svn.version: 428
-build.timestamp: 2016-02-26T07:18:42+0000
+svn.version: 429
+build.timestamp: 2016-03-02T07:39:57+0000
diff --git a/src/uk/me/parabola/splitter/DensityMap.java b/src/uk/me/parabola/splitter/DensityMap.java
index 54a61c0..e465db7 100644
--- a/src/uk/me/parabola/splitter/DensityMap.java
+++ b/src/uk/me/parabola/splitter/DensityMap.java
@@ -224,7 +224,10 @@ public class DensityMap {
public void saveMap(String fileName, Area detailBounds, Area collectorBounds) {
try (FileWriter f = new FileWriter(new File(fileName))){
f.write(detailBounds.getMinLat() + "," + detailBounds.getMinLong() + "," + detailBounds.getMaxLat() + "," + detailBounds.getMaxLong() + '\n');
- f.write(collectorBounds.getMinLat() + "," + collectorBounds.getMinLong() + "," + collectorBounds.getMaxLat() + "," + collectorBounds.getMaxLong() + '\n');
+ if (collectorBounds != null)
+ f.write(collectorBounds.getMinLat() + "," + collectorBounds.getMinLong() + "," + collectorBounds.getMaxLat() + "," + collectorBounds.getMaxLong() + '\n');
+ else
+ f.write("no_bounds_in_input\n");
//f.write(bounds.getMinLat() + "," + bounds.getMinLong() + "," + bounds.getMaxLat() + "," + bounds.getMaxLong() + '\n');
for (int x=0; x<width; x++){
if (nodeMap[x] != null){
@@ -273,14 +276,16 @@ public class DensityMap {
}
inLine = problemReader.readLine();
if (inLine != null){
- items = csvSplitter.split(inLine);
- if (items.length != 4){
- System.out.println("Error: Invalid format in map file, line number " + problemReader.getLineNumber() + ": "
- + inLine);
- return null;
+ if ("no_bounds_in_input".equals(inLine) == false){
+ items = csvSplitter.split(inLine);
+ if (items.length != 4){
+ System.out.println("Error: Invalid format in map file, line number " + problemReader.getLineNumber() + ": "
+ + inLine);
+ return null;
+ }
+ collectorBounds = new Area(Integer.parseInt(items[0]), Integer.parseInt(items[1]),
+ Integer.parseInt(items[2]),Integer.parseInt(items[3]));
}
- collectorBounds = new Area(Integer.parseInt(items[0]), Integer.parseInt(items[1]),
- Integer.parseInt(items[2]),Integer.parseInt(items[3]));
}
while ((inLine = problemReader.readLine()) != null) {
items = csvSplitter.split(inLine);
diff --git a/src/uk/me/parabola/splitter/DensityMapCollector.java b/src/uk/me/parabola/splitter/DensityMapCollector.java
index 7db4d0e..cc71e54 100644
--- a/src/uk/me/parabola/splitter/DensityMapCollector.java
+++ b/src/uk/me/parabola/splitter/DensityMapCollector.java
@@ -87,7 +87,7 @@ class DensityMapCollector extends AbstractMapProcessor{
}
public void saveMap(String fileName) {
- if (bounds != null && details != null && details.getBounds() != null)
+ if (details != null && details.getBounds() != null)
densityMap.saveMap(fileName, details.getBounds(), bounds);
}
public void readMap(String fileName) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/mkgmap-splitter.git
More information about the Pkg-grass-devel
mailing list