Open GoogleCodeExporter opened 9 years ago
I had similar problem with my dataset. I think it's reasonable to just to skip
the offending elements. Patch is here:
Index: src/com/google/code/osmandroidconverter/main/MapBuilder.java
===================================================================
--- src/com/google/code/osmandroidconverter/main/MapBuilder.java (revision 37)
+++ src/com/google/code/osmandroidconverter/main/MapBuilder.java (working copy)
@@ -6,6 +6,8 @@
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
@@ -76,6 +78,7 @@
for (OsmElement element : this.osmElements) {
+ try {
// skip place elements represented by an area
if (element.getType().indexOf("place") >= 0 && element.getNumNodes() != 1) {
@@ -103,6 +106,9 @@
t.addItem(item);
tileMap.put(tileName, t);
}
+ } catch (Exception e) {
+ logger.info("Element skipped. id:"+element.id+" reason:"+e.getMessage());
+ }
}
}
Original comment by tibor.arpas
on 15 Sep 2010 at 4:06
Original issue reported on code.google.com by
janrose....@googlemail.com
on 27 Nov 2009 at 2:56