
I agree with Thorsten. The patch removes too many areas. I don't understand the real logic behind this patch. Why should we remove areas that changes its size more than 100% etc.? I think it makes only make sense to detect if the area changes its sign because that means that the clockwise/counterclockwise direction changes and the callers rely on the fact that clockwise means "it's an outer polygon" and counterclockwise means "it's an inner polygon". In this case it might make sense just to revert the direction of the way and not to throw it away. WanMil
Hello Thorsten,
yes, I mean the verify_boundary.patch the problem is caused by the fact that the boundaries are cut into pieces (one for each bounding box of the *.bnd file). The null pointer is produdced if a boundary intersects with such a bbox in only one or two points (e.g. the corner), because the program starts to write the data for that boundary before verifying if it has a usable area. My patch removes the elements that are too small, and if that results in an empty boundary area, it doesn't save it into this *.bnd file. This doesn't mean that the boundary is not saved to other bnd files.
If you don't trust the part that removes the small parts, just use the part that changes BoundarySaver.write()
Ciao, Gerd
Date: Tue, 7 Feb 2012 18:43:21 +0100 From: kukuk@suse.de To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] Again NullPointerException
Hi Gerd,
On Tue, Feb 07, GerdP wrote:
Hi Thorsten,
You seem to create a boundary which doesn't contain any usable area. I think you will see an error message if you run mkgmap with -ea
The patch that I posted before should also detect this situation.
Do you mean the verify_boundary patch?
Don't know if that helps here, currently trying it out. But for my opinion it removes far too much valid data.
For example I don't see what should be wrong with that relation: area shape removed [undecided_inner_outer] r1953238
Or why are this areas too small? area shape removed [too_small] r1800578 area shape removed [too_small] w33114372
Thorsten
Thorsten Kukuk wrote
On Tue, Feb 07, Thorsten Kukuk wrote:
generating boundary files did work for quite some time now with mkgmap r2188, but since yesterday I get again a Null Pointer Exception:
Exception in thread "main" java.lang.NullPointerException at java.awt.geom.Area.<init>(Unknown Source) at
uk.me.parabola.mkgmap.reader.osm.boundary.Boundary.<init>(Boundary.j)
at
uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryUtil.loadBoundaryF)
at
uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryPreparer.workoutBo)
at
uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryPreparer.run(Bound)
at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:333) at
uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.j)
at uk.me.parabola.mkgmap.main.Main.main(Main.java:112)
I cannot find anything from interest in the log files.
Between, I don't find any output of the new warning in BoundaryUtil.java from r2187. Either it is never triggered, or I have to adjust my logging.properties file. Which line does the rule need to have to get the output?
Thorsten
-- Thorsten Kukuk, Project Manager/Release Manager SLES SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) _______________________________________________ mkgmap-dev mailing list mkgmap-dev@.org http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- View this message in context: http://gis.19327.n5.nabble.com/Again-NullPointerException-tp5463324p5463684.... Sent from the Mkgmap Development mailing list archive at Nabble.com. _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev -- Thorsten Kukuk, Project Manager/Release Manager SLES SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev