logo separator

[mkgmap-dev] Bug (?) in performance branch

From GerdP gpetermann_muenchen at hotmail.com on Sun Mar 4 16:27:01 GMT 2012

Hi,

with my test data, all of them were ways that had no points within the
savers 
bounding box. Is it okay to ignore those?

Gerd


WanMil wrote
> 
> Hi,
> 
> the performance branch does not find any bounds information for a few 
> ways and nodes. It's about 10 ways per tile where this happens.
> 
> Having on look on them some are well explainable because they are 
> located in the North Sea. But others are located completely within a 
> country (e.g. in the middle of France or Dutch). From my understanding 
> they must be assigned at least with the country information beause these 
> countries do not have holes.
> 
> The following patch creates a GPX file for each node/way that is not 
> assigned with any bounds information. This makes it quite easy to check 
> where the errorneous ways/nodes are located.
> 
> WanMil
> 
> Index: src/uk/me/parabola/mkgmap/reader/osm/LocationHook.java
> ===================================================================
> --- src/uk/me/parabola/mkgmap/reader/osm/LocationHook.java	(revision 2234)
> +++ src/uk/me/parabola/mkgmap/reader/osm/LocationHook.java	(working copy)
> @@ -12,6 +12,7 @@
>    */
>   package uk.me.parabola.mkgmap.reader.osm;
> 
> +import java.util.Collections;
>   import java.util.HashSet;
>   import java.util.Iterator;
>   import java.util.List;
> @@ -24,6 +25,7 @@
>   import uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryQuadTree;
>   import uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryUtil;
>   import uk.me.parabola.util.EnhancedProperties;
> +import uk.me.parabola.util.GpxCreator;
> 
>   public class LocationHook extends OsmReadingHooksAdaptor {
>   	private static final boolean PRINT_RESULT = false;
> @@ -157,6 +159,8 @@
>   		if (elem instanceof Node){
>   			Node node = (Node) elem;
>   			tags = search(node.getLocation());
> +			if (tags == null)
> +			GpxCreator.createGpx(GpxCreator.getGpxBaseName()+"n"+elem.getId(), 
> Collections.singletonList(((Node) elem).getLocation()));
>   		}
>   		else if (elem instanceof Way){
>   			Way way = (Way) elem;
> @@ -181,8 +185,10 @@
>   						break;
>   				}
>   			}
> -			if (tags == null)
> +			if (tags == null) {
> +				GpxCreator.createGpx(GpxCreator.getGpxBaseName()+"w"+way.getId(), 
> way.getPoints());
>   				++cntwayNotFnd;
> +			}
>   		}
> 
>   		if (tags == null){
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at .org
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> 


--
View this message in context: http://gis.19327.n5.nabble.com/Bug-in-performance-branch-tp5535442p5535456.html
Sent from the Mkgmap Development mailing list archive at Nabble.com.



More information about the mkgmap-dev mailing list