logo separator

[mkgmap-dev] Again NullPointerException

From Gerd Petermann gpetermann_muenchen at hotmail.com on Tue Feb 7 21:11:13 GMT 2012

Hi WanMil,

I started looking at this problem because of an error in the BoundaryQuadtree.merge() method. The error caused the same areas to be intersected again and again and that produced many of these special cases. After fixing the error in the merge() method I also doubted whether these special cases should be handled. 
So, I will remove everything that is not related to the inner/outer problem. 
I also agree that it is better to revert the direction instead of deleting it. 

Ciao,
Gerd 

> Date: Tue, 7 Feb 2012 21:08:43 +0100
> From: wmgcnfg at web.de
> To: mkgmap-dev at lists.mkgmap.org.uk
> Subject: Re: [mkgmap-dev] Again NullPointerException
> 
> 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 at suse.de
> >  > To: mkgmap-dev at 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 at .org
> >  > > > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> >  > > >
> >  > >
> >  > >
> >  > > --
> >  > > View this message in context:
> > http://gis.19327.n5.nabble.com/Again-NullPointerException-tp5463324p5463684.html
> >  > > Sent from the Mkgmap Development mailing list archive at Nabble.com.
> >  > > _______________________________________________
> >  > > mkgmap-dev mailing list
> >  > > mkgmap-dev at 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 at lists.mkgmap.org.uk
> >  > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> >
> >
> > _______________________________________________
> > mkgmap-dev mailing list
> > mkgmap-dev at lists.mkgmap.org.uk
> > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> 
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20120207/77f545f4/attachment.html 


More information about the mkgmap-dev mailing list