logo separator

[mkgmap-dev] mkgmap r2179: Still NullPointerException in BoundaryUtil

From Martin mkgmap at snailrun.de on Thu Jan 26 10:46:46 GMT 2012

Hi,

I'm also getting rejects using fresh checked out from trunk and applying 
this patch.
I'm using Ubuntu

(Stripping trailing CRs from patch.)
patching file src/uk/me/parabola/mkgmap/reader/osm/boundary/Boundary.java
Hunk #1 FAILED at 92.
1 out of 1 hunk FAILED -- saving rejects to file 
src/uk/me/parabola/mkgmap/reader/osm/boundary/Boundary.java.rej
(Stripping trailing CRs from patch.)
patching file 
src/uk/me/parabola/mkgmap/reader/osm/boundary/BoundaryElement.java
Hunk #1 FAILED at 45.
1 out of 1 hunk FAILED -- saving rejects to file 
src/uk/me/parabola/mkgmap/reader/osm/boundary/BoundaryElement.java.rej
(Stripping trailing CRs from patch.)
patching file 
src/uk/me/parabola/mkgmap/reader/osm/boundary/BoundarySaver.java
Hunk #1 FAILED at 22.
Hunk #2 FAILED at 293.
Hunk #3 FAILED at 313.
3 out of 3 hunks FAILED -- saving rejects to file 
src/uk/me/parabola/mkgmap/reader/osm/boundary/BoundarySaver.java.rej
(Stripping trailing CRs from patch.)
patching file 
src/uk/me/parabola/mkgmap/reader/osm/boundary/BoundaryUtil.java
Hunk #1 FAILED at 35.
Hunk #2 FAILED at 46.
Hunk #3 FAILED at 67.
Hunk #4 FAILED at 84.
Hunk #5 FAILED at 138.
5 out of 5 hunks FAILED -- saving rejects to file 
src/uk/me/parabola/mkgmap/reader/osm/boundary/BoundaryUtil.java.rej
(Stripping trailing CRs from patch.)
patching file src/uk/me/parabola/util/FloatCoord.java
(Stripping trailing CRs from patch.)
patching file src/uk/me/parabola/util/Java2DConverter.java
Hunk #1 FAILED at 213.


//Martin


Am 2012-01-26 11:38, schrieb GerdP:
> hmm, I just tested it on a clean trunk src without problems.
>
> Gerd
>
>
> Thorsten Kukuk wrote
>> On Thu, Jan 26, Gerd Petermann wrote:
>>
>>> Hi Thorsten,
>>>
>>> please try the attached patch. It is not elegant, but I think it will
>>> solve the problem.
>>> As mentioned before, the problem is caused by rounding errors, so I've
>>> coded a check
>>> that detects when this situation happens. Area parts that cause this
>>> error are removed.
>>> If you like, you can unncomment the lines around GpxCreator to write the
>>> deleted parts
>>> to files.
>> Hm, somehow I'm not able to apply the patch, I only got rejects,
>> but the patch should fit ...
>>
>>> ciao,
>>> Gerd
>>>
>>>> Date: Wed, 25 Jan 2012 08:11:30 +0100
>>>> From: kukuk@
>>>> To: mkgmap-dev at .org
>>>> Subject: Re: [mkgmap-dev] mkgmap r2179: Still NullPointerException	in
>>> BoundaryUtil
>>>>
>>>>
>>>> Hi Gerd,
>>>>
>>>> On Tue, Jan 24, Gerd Petermann wrote:
>>>>
>>>>> Hi Thorsten,
>>>>>
>>>>> don't worry, the patch was not meant to fix your problem.
>>>>> It just adds a method to class Way, but the method is not even called
>>> anywhere.
>>>> Sorry, was clearly too late yesterday for me, I should have seen that
>>>> the new method isn't called anywhere :(
>>>>
>>>>    Thorsten
>>>>
>>>>>> Date: Tue, 24 Jan 2012 22:57:19 +0100
>>>>>> From: kukuk@
>>>>>> To: mkgmap-dev at .org
>>>>>> Subject: Re: [mkgmap-dev] mkgmap r2179: Still NullPointerException
>>> in	BoundaryUtil
>>>>>>
>>>>>> Hi Gerd,
>>>>>>
>>>>>> On Tue, Jan 24, Gerd Petermann wrote:
>>>>>>
>>>>>>> Hi WanMil,
>>>>>>>
>>>>>>> I have coded a small test that tries to detect these "spike-like"
>>> areas. Idea:
>>>>>>> If the area size is much smaller (I used 20 as a threshold) than
>>> that of the bounding box we should remove
>>>>>>> the way from the area.
>>>>>> This patch does at least not fix my problem, still get exact the
>>>>>> same stack trace.
>>>>>>
>>>>>>    Thorsten
>>>>>>
>>>>>>
>>>>>>> I am not sure regarding the threshold value, but I think the
>>> principle is ok.
>>>>>>> What do you think?
>>>>>>>
>>>>>>> Gerd
>>>>>>>
>>>>>>>
>>>>>>>> Date: Tue, 24 Jan 2012 08:04:47 -0800
>>>>>>>> From: gpetermann_muenchen@
>>>>>>>> To: mkgmap-dev at .org
>>>>>>>> Subject: Re: [mkgmap-dev] mkgmap r2179: Still
>>> NullPointerException in	BoundaryUtil
>>>>>>>> Hi Thorsten,
>>>>>>>>
>>>>>>>> I can confirm this problem. I can repdroduce it with a
>>> "boundary" which
>>>>>>>> contains these 4 points:
>>>>>>>> [2412980/371559, 2412981/371558, 2412992/371544,
>>> 2412980/371559]
>>>>>>>> The Way.clockwise() method says it is counter-clockwise.
>>>>>>>> Besides rounding errors, it is a line, not a shape, and I guess
>>> that causes
>>>>>>>> the problem. The clockwise() method calculates an area size of
>>> 3, which is
>>>>>>>> almost zero.
>>>>>>>>
>>>>>>>> It is quite likely that the intersection of two areas produces
>>> these "nearly
>>>>>>>> empty" (parts of) areas, what we need is a filter that throws
>>> them away.
>>>>>>>> I am not sure if WanMil is already working on this?
>>>>>>>>
>>>>>>>> Gerd
>>>>>>>>
>>>>>>>>
>>>>>>>> Thorsten Kukuk wrote
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> I compiled mkgmap r2179 and tried to create the bounds files
>>> with
>>>>>>>>> it:
>>>>>>>>>
>>>>>>>>> osmconvert data/planet/planet-120122.osm.pbf --out-o5m
>>>>>>>>> osmfilter data/boundaries/world-20120122.o5m --keep-nodes=
>>>>>>>>> '--keep-ways-relations=boundary=administrative =postal_code
>>> postal_code='
>>>>>>>>> mkgmap
>>> --createboundsfile=data/boundaries/boundaries-20120122.osm.gz
>>>>>>>>> --bounds=data/boundaries/20120122
>>>>>>>>> Schwerwiegend (BoundarySaver): Calculate bbox to
>>>>>>>>> (-90.12222290039062,-180.24444580078125) to
>>>>>>>>> (82.6120376586914,179.17156219482422)
>>>>>>>>> Exception in thread "main" java.lang.NullPointerException
>>>>>>>>>          at
>>>>>>>>>
>>> uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryUtil.loadBoundaryFile(BoundaryUtil.java:169)
>>>>>>>>>          at
>>>>>>>>>
>>> uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryPreparer.workoutBoundaryRelations(BoundaryPreparer.java:144)
>>>>>>>>>          at
>>>>>>>>>
>>> uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryPreparer.run(BoundaryPreparer.java:110)
>>>>>>>>>          at
>>> uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:333)
>>>>>>>>>          at
>>>>>>>>>
>>> uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:126)
>>>>>>>>>          at
>>> uk.me.parabola.mkgmap.main.Main.main(Main.java:112)
>>>>>>>>> Command exited with non-zero status 1
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>   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.638310.n2.nabble.com/mkgmap-r2179-Still-NullPointerException-in-BoundaryUtil-tp7215004p7220841.html
>>>>>>>> Sent from the Mkgmap Development mailing list archive at
>>> Nabble.com.
>>>>>>>> _______________________________________________
>>>>>>>> mkgmap-dev mailing list
>>>>>>>> mkgmap-dev at .org
>>>>>>>> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>>>>>>>   		 	   		
>>>>>>> _______________________________________________
>>>>>>> mkgmap-dev mailing list
>>>>>>> mkgmap-dev at .org
>>>>>>> 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 .org
>>>>>> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>>>>>   		 	   		
>>>>> _______________________________________________
>>>>> mkgmap-dev mailing list
>>>>> mkgmap-dev at .org
>>>>> 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 .org
>>>> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>>>   		 	   		
>>> _______________________________________________
>>> mkgmap-dev mailing list
>>> mkgmap-dev at .org
>>> 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 .org
>> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>>
>
> --
> View this message in context: http://gis.19327.n5.nabble.com/mkgmap-r2179-Still-NullPointerException-in-BoundaryUtil-tp5324451p5432512.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




More information about the mkgmap-dev mailing list