[PATCH] Again NullPointerException

classic Classic list List threaded Threaded
35 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[PATCH] Again NullPointerException

Gerd Petermann
Hi,

as a result of previous discussions here is th new patch.

verify_boundary_v3.patch

Changes:
Verify if rounding errors change the direction of a way (clockwise/counterclockwise order), if that happens,
change the order so that Way.clockwise() returns the wanted result.

The patch introduces a new method

Java2DConverter.verifiedAreaToShapes()

instead of changing the existing

Java2DConverter.areaToShapes(area)

I did this because Java2DConverter.areaToShapes(area) is called in other places and I wanted to avoid side effects. Maybe someone who knows the sources in
PolygonSplitterBase.java and PolygonClipper.java
can look at this and see if they benefit also from the verified routine?

Gerd
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Again NullPointerException

Thorsten Kukuk

Hi,

On Thu, Feb 09, GerdP wrote:

> Hi,
>
> as a result of previous discussions here is th new patch.
>
> http://gis.19327.n5.nabble.com/file/n5471749/verify_boundary_v3.patch
> verify_boundary_v3.patch

With mkgmap-r2205, with and without this patch, I get an expecption
on the planet data from 2012-02-10:

Exception in thread "main" java.lang.AssertionError
        at uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryUtil.loadBoundaryFile(BoundaryUtil.java:145)

If I disable the assert, mkgmap-r2205 finishes building boundarys
without problems.

There is only one big difference in the boundary data:
The boundary data created by mkgmap with this patch is 15% smaller
than the one created without this patch.

I don't know how to compare best which data is missing, but I think
15% is a lot. Or is this expected?

  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
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Again NullPointerException

Gerd Petermann
Hi Thorsten,

I think something must be wrong. I would not expect a change in file sizes and I did not
see one in my test data.
The patch verify_boundary_v3.patch doesn't remove any data, so I assume that
you have applied one of the older patches.
Can you please verify that ?
The correct patch contains a line with
Collections.reverse(coords);

Gerd


> Date: Sat, 11 Feb 2012 16:49:59 +0100

> From: [hidden email]
> To: [hidden email]
> Subject: Re: [mkgmap-dev] [PATCH] Again NullPointerException
>
>
> Hi,
>
> On Thu, Feb 09, GerdP wrote:
>
> > Hi,
> >
> > as a result of previous discussions here is th new patch.
> >
> > http://gis.19327.n5.nabble.com/file/n5471749/verify_boundary_v3.patch
> > verify_boundary_v3.patch
>
> With mkgmap-r2205, with and without this patch, I get an expecption
> on the planet data from 2012-02-10:
>
> Exception in thread "main" java.lang.AssertionError
> at uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryUtil.loadBoundaryFile(BoundaryUtil.java:145)
>
> If I disable the assert, mkgmap-r2205 finishes building boundarys
> without problems.
>
> There is only one big difference in the boundary data:
> The boundary data created by mkgmap with this patch is 15% smaller
> than the one created without this patch.
>
> I don't know how to compare best which data is missing, but I think
> 15% is a lot. Or is this expected?
>
> 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
> [hidden email]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Again NullPointerException

Thorsten Kukuk
On Sat, Feb 11, Gerd Petermann wrote:

>
> Hi Thorsten,
>
> I think something must be wrong. I would not expect a change in file sizes and I did not
> see one in my test data.
> The patch verify_boundary_v3.patch doesn't remove any data, so I assume that
> you have applied one of the older patches.
> Can you please verify that ?
> The correct patch contains a line with
> Collections.reverse(coords);

Yes, I only applied the correct patch.

The only difference between your tests and my I see is, that I run
into this assert check. Maybe that makes the difference?

  Thorsten

> Gerd
>
>
> > Date: Sat, 11 Feb 2012 16:49:59 +0100
> > From: [hidden email]
> > To: [hidden email]
> > Subject: Re: [mkgmap-dev] [PATCH] Again NullPointerException
> >
> >
> > Hi,
> >
> > On Thu, Feb 09, GerdP wrote:
> >
> > > Hi,
> > >
> > > as a result of previous discussions here is th new patch.
> > >
> > > http://gis.19327.n5.nabble.com/file/n5471749/verify_boundary_v3.patch
> > > verify_boundary_v3.patch
> >
> > With mkgmap-r2205, with and without this patch, I get an expecption
> > on the planet data from 2012-02-10:
> >
> > Exception in thread "main" java.lang.AssertionError
> >         at uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryUtil.loadBoundaryFile(BoundaryUtil.java:145)
> >
> > If I disable the assert, mkgmap-r2205 finishes building boundarys
> > without problems.
> >
> > There is only one big difference in the boundary data:
> > The boundary data created by mkgmap with this patch is 15% smaller
> > than the one created without this patch.
> >
> > I don't know how to compare best which data is missing, but I think
> > 15% is a lot. Or is this expected?
> >
> >   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
> > [hidden email]
> > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>      
> _______________________________________________
> mkgmap-dev mailing list
> [hidden email]
> 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
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Again NullPointerException

Gerd Petermann
Hi Thorsten,

I still don't understand. If you enable assertions and you hit one, the program stops and you will have incomplete data.
It makes no sense to use that data or compare sizes.
If you disable assertions, the program should finish (both r2205 and the patched version) and I don't expect different
file sizes.
I don't understand yet how you can run into the assertion with my patch applied  If your input file is not too big, I like to
try it.

Ciao,
Gerd


> Date: Sat, 11 Feb 2012 17:54:47 +0100

> From: [hidden email]
> To: [hidden email]
> Subject: Re: [mkgmap-dev] [PATCH] Again NullPointerException
>
> On Sat, Feb 11, Gerd Petermann wrote:
>
> >
> > Hi Thorsten,
> >
> > I think something must be wrong. I would not expect a change in file sizes and I did not
> > see one in my test data.
> > The patch verify_boundary_v3.patch doesn't remove any data, so I assume that
> > you have applied one of the older patches.
> > Can you please verify that ?
> > The correct patch contains a line with
> > Collections.reverse(coords);
>
> Yes, I only applied the correct patch.
>
> The only difference between your tests and my I see is, that I run
> into this assert check. Maybe that makes the difference?
>
> Thorsten
>
> > Gerd
> >
> >
> > > Date: Sat, 11 Feb 2012 16:49:59 +0100
> > > From: [hidden email]
> > > To: [hidden email]
> > > Subject: Re: [mkgmap-dev] [PATCH] Again NullPointerException
> > >
> > >
> > > Hi,
> > >
> > > On Thu, Feb 09, GerdP wrote:
> > >
> > > > Hi,
> > > >
> > > > as a result of previous discussions here is th new patch.
> > > >
> > > > http://gis.19327.n5.nabble.com/file/n5471749/verify_boundary_v3.patch
> > > > verify_boundary_v3.patch
> > >
> > > With mkgmap-r2205, with and without this patch, I get an expecption
> > > on the planet data from 2012-02-10:
> > >
> > > Exception in thread "main" java.lang.AssertionError
> > > at uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryUtil.loadBoundaryFile(BoundaryUtil.java:145)
> > >
> > > If I disable the assert, mkgmap-r2205 finishes building boundarys
> > > without problems.
> > >
> > > There is only one big difference in the boundary data:
> > > The boundary data created by mkgmap with this patch is 15% smaller
> > > than the one created without this patch.
> > >
> > > I don't know how to compare best which data is missing, but I think
> > > 15% is a lot. Or is this expected?
> > >
> > > 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
> > > [hidden email]
> > > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> >
> > _______________________________________________
> > mkgmap-dev mailing list
> > [hidden email]
> > 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
> [hidden email]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Again NullPointerException

Thorsten Kukuk
On Sat, Feb 11, Gerd Petermann wrote:

>
> Hi Thorsten,
>
> I still don't understand. If you enable assertions and you hit one, the program stops and you will have incomplete data.
> It makes no sense to use that data or compare sizes.

Correct, and I didn't compared that.

> If you disable assertions, the program should finish (both r2205 and the patched version) and I don't expect different
> file sizes.
> I don't understand yet how you can run into the assertion with my patch applied  If your input file is not too big, I like to
> try it.

As written: it's the planet file from yesterday.

  Thorsten

> > Date: Sat, 11 Feb 2012 17:54:47 +0100
> > From: [hidden email]
> > To: [hidden email]
> > Subject: Re: [mkgmap-dev] [PATCH] Again NullPointerException
> >
> > On Sat, Feb 11, Gerd Petermann wrote:
> >
> > >
> > > Hi Thorsten,
> > >
> > > I think something must be wrong. I would not expect a change in file sizes and I did not
> > > see one in my test data.
> > > The patch verify_boundary_v3.patch doesn't remove any data, so I assume that
> > > you have applied one of the older patches.
> > > Can you please verify that ?
> > > The correct patch contains a line with
> > > Collections.reverse(coords);
> >
> > Yes, I only applied the correct patch.
> >
> > The only difference between your tests and my I see is, that I run
> > into this assert check. Maybe that makes the difference?
> >
> >   Thorsten
> >
> > > Gerd
> > >
> > >
> > > > Date: Sat, 11 Feb 2012 16:49:59 +0100
> > > > From: [hidden email]
> > > > To: [hidden email]
> > > > Subject: Re: [mkgmap-dev] [PATCH] Again NullPointerException
> > > >
> > > >
> > > > Hi,
> > > >
> > > > On Thu, Feb 09, GerdP wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > as a result of previous discussions here is th new patch.
> > > > >
> > > > > http://gis.19327.n5.nabble.com/file/n5471749/verify_boundary_v3.patch
> > > > > verify_boundary_v3.patch
> > > >
> > > > With mkgmap-r2205, with and without this patch, I get an expecption
> > > > on the planet data from 2012-02-10:
> > > >
> > > > Exception in thread "main" java.lang.AssertionError
> > > >         at uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryUtil.loadBoundaryFile(BoundaryUtil.java:145)
> > > >
> > > > If I disable the assert, mkgmap-r2205 finishes building boundarys
> > > > without problems.
> > > >
> > > > There is only one big difference in the boundary data:
> > > > The boundary data created by mkgmap with this patch is 15% smaller
> > > > than the one created without this patch.
> > > >
> > > > I don't know how to compare best which data is missing, but I think
> > > > 15% is a lot. Or is this expected?
> > > >
> > > >   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
> > > > [hidden email]
> > > > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> > >      
> > > _______________________________________________
> > > mkgmap-dev mailing list
> > > [hidden email]
> > > 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
> > [hidden email]
> > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>      
> _______________________________________________
> mkgmap-dev mailing list
> [hidden email]
> 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
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Again NullPointerException

Gerd Petermann
Hi Thorsten,

okay, so you have to wait until someone with a big machine tries it. I may be able to download planet data, but I cannot run mkgmap on a file containing planet boundaries.
My machine  has max. ~3GB java heap available, that was just enough for europe boundary data.
Sorry !

Gerd


> Date: Sat, 11 Feb 2012 18:38:48 +0100

> From: [hidden email]
> To: [hidden email]
> Subject: Re: [mkgmap-dev] [PATCH] Again NullPointerException
>
> On Sat, Feb 11, Gerd Petermann wrote:
>
> >
> > Hi Thorsten,
> >
> > I still don't understand. If you enable assertions and you hit one, the program stops and you will have incomplete data.
> > It makes no sense to use that data or compare sizes.
>
> Correct, and I didn't compared that.
>
> > If you disable assertions, the program should finish (both r2205 and the patched version) and I don't expect different
> > file sizes.
> > I don't understand yet how you can run into the assertion with my patch applied If your input file is not too big, I like to
> > try it.
>
> As written: it's the planet file from yesterday.
>
> Thorsten
>
> > > Date: Sat, 11 Feb 2012 17:54:47 +0100
> > > From: [hidden email]
> > > To: [hidden email]
> > > Subject: Re: [mkgmap-dev] [PATCH] Again NullPointerException
> > >
> > > On Sat, Feb 11, Gerd Petermann wrote:
> > >
> > > >
> > > > Hi Thorsten,
> > > >
> > > > I think something must be wrong. I would not expect a change in file sizes and I did not
> > > > see one in my test data.
> > > > The patch verify_boundary_v3.patch doesn't remove any data, so I assume that
> > > > you have applied one of the older patches.
> > > > Can you please verify that ?
> > > > The correct patch contains a line with
> > > > Collections.reverse(coords);
> > >
> > > Yes, I only applied the correct patch.
> > >
> > > The only difference between your tests and my I see is, that I run
> > > into this assert check. Maybe that makes the difference?
> > >
> > > Thorsten
> > >
> > > > Gerd
> > > >
> > > >
> > > > > Date: Sat, 11 Feb 2012 16:49:59 +0100
> > > > > From: [hidden email]
> > > > > To: [hidden email]
> > > > > Subject: Re: [mkgmap-dev] [PATCH] Again NullPointerException
> > > > >
> > > > >
> > > > > Hi,
> > > > >
> > > > > On Thu, Feb 09, GerdP wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > as a result of previous discussions here is th new patch.
> > > > > >
> > > > > > http://gis.19327.n5.nabble.com/file/n5471749/verify_boundary_v3.patch
> > > > > > verify_boundary_v3.patch
> > > > >
> > > > > With mkgmap-r2205, with and without this patch, I get an expecption
> > > > > on the planet data from 2012-02-10:
> > > > >
> > > > > Exception in thread "main" java.lang.AssertionError
> > > > > at uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryUtil.loadBoundaryFile(BoundaryUtil.java:145)
> > > > >
> > > > > If I disable the assert, mkgmap-r2205 finishes building boundarys
> > > > > without problems.
> > > > >
> > > > > There is only one big difference in the boundary data:
> > > > > The boundary data created by mkgmap with this patch is 15% smaller
> > > > > than the one created without this patch.
> > > > >
> > > > > I don't know how to compare best which data is missing, but I think
> > > > > 15% is a lot. Or is this expected?
> > > > >
> > > > > 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
> > > > > [hidden email]
> > > > > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> > > >
> > > > _______________________________________________
> > > > mkgmap-dev mailing list
> > > > [hidden email]
> > > > 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
> > > [hidden email]
> > > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> >
> > _______________________________________________
> > mkgmap-dev mailing list
> > [hidden email]
> > 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
> [hidden email]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Again NullPointerException

WanMil
In reply to this post by Gerd Petermann
Hi Gerd,

thanks for the patch.

The verifiedAreaToShapes should replace the areaToShapes method. The
only reason it should not replace is if the performance is noticeably
slower.

The clockwise check before reversing is superfluous:
    Way w = new Way(0, coords);
    if (w.clockwise() != (realAreaSize <= 0)){
       Collections.reverse(coords);
     }
     outputs.add(coords);

The direction might change in both situations so it should also be
checked if the direction changes from ccw to cw. Do you agree?

WanMil

> Hi,
>
> as a result of previous discussions here is th new patch.
>
> http://gis.19327.n5.nabble.com/file/n5471749/verify_boundary_v3.patch
> verify_boundary_v3.patch
>
> Changes:
> Verify if rounding errors change the direction of a way
> (clockwise/counterclockwise order), if that happens,
> change the order so that Way.clockwise() returns the wanted result.
>
> The patch introduces a new method
>
> Java2DConverter.verifiedAreaToShapes()
>
> instead of changing the existing
>
> Java2DConverter.areaToShapes(area)
>
> I did this because Java2DConverter.areaToShapes(area) is called in other
> places and I wanted to avoid side effects. Maybe someone who knows the
> sources in
> PolygonSplitterBase.java and PolygonClipper.java
> can look at this and see if they benefit also from the verified routine?
>
> Gerd
>
> --
> View this message in context: http://gis.19327.n5.nabble.com/PATCH-Again-NullPointerException-tp5471749p5471749.html
> Sent from the Mkgmap Development mailing list archive at Nabble.com.
> _______________________________________________
> mkgmap-dev mailing list
> [hidden email]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Again NullPointerException

Gerd Petermann
Hi WanMil,

> Date: Sun, 12 Feb 2012 12:05:55 +0100

> From: [hidden email]
> To: [hidden email]
> Subject: Re: [mkgmap-dev] [PATCH] Again NullPointerException
>
> Hi Gerd,
>
> thanks for the patch.
>
> The verifiedAreaToShapes should replace the areaToShapes method. The
> only reason it should not replace is if the performance is noticeably
> slower.

I did not see a notble impact during my tests.

>
> The clockwise check before reversing is superfluous:
> Way w = new Way(0, coords);
> if (w.clockwise() != (realAreaSize <= 0)){
> Collections.reverse(coords);
> }
> outputs.add(coords);
>
> The direction might change in both situations so it should also be
> checked if the direction changes from ccw to cw. Do you agree?

No.
I think the code is exactly doing what you want. It reverses the order if way.clockwise() returns
a wrong result, no matter if ccw or cw is correct. At least that's what I want it to do.
Are you sure that it doesn't work?

>
> WanMil
>
> > Hi,
> >
> > as a result of previous discussions here is th new patch.
> >
> > http://gis.19327.n5.nabble.com/file/n5471749/verify_boundary_v3.patch
> > verify_boundary_v3.patch
> >
> > Changes:
> > Verify if rounding errors change the direction of a way
> > (clockwise/counterclockwise order), if that happens,
> > change the order so that Way.clockwise() returns the wanted result.
> >
> > The patch introduces a new method
> >
> > Java2DConverter.verifiedAreaToShapes()
> >
> > instead of changing the existing
> >
> > Java2DConverter.areaToShapes(area)
> >
> > I did this because Java2DConverter.areaToShapes(area) is called in other
> > places and I wanted to avoid side effects. Maybe someone who knows the
> > sources in
> > PolygonSplitterBase.java and PolygonClipper.java
> > can look at this and see if they benefit also from the verified routine?
> >
> > Gerd
> >
> > --
> > View this message in context: http://gis.19327.n5.nabble.com/PATCH-Again-NullPointerException-tp5471749p5471749.html
> > Sent from the Mkgmap Development mailing list archive at Nabble.com.
> > _______________________________________________
> > mkgmap-dev mailing list
> > [hidden email]
> > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>
> _______________________________________________
> mkgmap-dev mailing list
> [hidden email]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Again NullPointerException

WanMil
Am 12.02.2012 12:25, schrieb Gerd Petermann:

> Hi WanMil,
>
>  > Date: Sun, 12 Feb 2012 12:05:55 +0100
>  > From: [hidden email]
>  > To: [hidden email]
>  > Subject: Re: [mkgmap-dev] [PATCH] Again NullPointerException
>  >
>  > Hi Gerd,
>  >
>  > thanks for the patch.
>  >
>  > The verifiedAreaToShapes should replace the areaToShapes method. The
>  > only reason it should not replace is if the performance is noticeably
>  > slower.
>
> I did not see a notble impact during my tests.
>
>  >
>  > The clockwise check before reversing is superfluous:
>  > Way w = new Way(0, coords);
>  > if (w.clockwise() != (realAreaSize <= 0)){
>  > Collections.reverse(coords);
>  > }
>  > outputs.add(coords);
>  >
>  > The direction might change in both situations so it should also be
>  > checked if the direction changes from ccw to cw. Do you agree?
>
> No.
> I think the code is exactly doing what you want. It reverses the order
> if way.clockwise() returns
> a wrong result, no matter if ccw or cw is correct. At least that's what
> I want it to do.
> Are you sure that it doesn't work?

Uups. You are right. I just read the code and didn't test it yet.
It works as it should :-)

>
>  >
>  > WanMil
>  >
>  > > Hi,
>  > >
>  > > as a result of previous discussions here is th new patch.
>  > >
>  > > http://gis.19327.n5.nabble.com/file/n5471749/verify_boundary_v3.patch
>  > > verify_boundary_v3.patch
>  > >
>  > > Changes:
>  > > Verify if rounding errors change the direction of a way
>  > > (clockwise/counterclockwise order), if that happens,
>  > > change the order so that Way.clockwise() returns the wanted result.
>  > >
>  > > The patch introduces a new method
>  > >
>  > > Java2DConverter.verifiedAreaToShapes()
>  > >
>  > > instead of changing the existing
>  > >
>  > > Java2DConverter.areaToShapes(area)
>  > >
>  > > I did this because Java2DConverter.areaToShapes(area) is called in
> other
>  > > places and I wanted to avoid side effects. Maybe someone who knows the
>  > > sources in
>  > > PolygonSplitterBase.java and PolygonClipper.java
>  > > can look at this and see if they benefit also from the verified
> routine?
>  > >
>  > > Gerd
>  > >
>  > > --
>  > > View this message in context:
> http://gis.19327.n5.nabble.com/PATCH-Again-NullPointerException-tp5471749p5471749.html
>  > > Sent from the Mkgmap Development mailing list archive at Nabble.com.
>  > > _______________________________________________
>  > > mkgmap-dev mailing list
>  > > [hidden email]
>  > > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>  >
>  > _______________________________________________
>  > mkgmap-dev mailing list
>  > [hidden email]
>  > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>
>
> _______________________________________________
> mkgmap-dev mailing list
> [hidden email]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Again NullPointerException

Thorsten Kukuk
In reply to this post by Gerd Petermann

Hi Gerd,

On Sat, Feb 11, Gerd Petermann wrote:

>
> Hi Thorsten,
>
> okay, so you have to wait until someone with a big machine tries it. I may be able to download planet data, but I cannot run mkgmap on a file containing planet boundaries.
> My machine  has max. ~3GB java heap available, that was just enough for europe boundary data.


I tried it now with my DACH extract. The differences are
only small (two files) and this time the unpatched version
is bigger than the one with your patch:

-bounds_2200000_400000.bnd      2294004
+bounds_2200000_400000.bnd      2293956
-bounds_2350000_600000.bnd      1817189
+bounds_2350000_600000.bnd      1816893

All other 82 files have the same size.

  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
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Again NullPointerException

WanMil
Thorsten,

can you check the differences between patched and unpatched version?

There is a tool which compares two boundary directories and saves the
differences as GPX files.

It is called:
java -cp mkgmap.jar
uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryDiff <dir1> <dir2>

It creates a subdirectory named gpx with the differences. That should
give a quick answer what happened.

Thanks!
WanMil

>
> Hi Gerd,
>
> On Sat, Feb 11, Gerd Petermann wrote:
>
>>
>> Hi Thorsten,
>>
>> okay, so you have to wait until someone with a big machine tries it. I may be able to download planet data, but I cannot run mkgmap on a file containing planet boundaries.
>> My machine  has max. ~3GB java heap available, that was just enough for europe boundary data.
>
>
> I tried it now with my DACH extract. The differences are
> only small (two files) and this time the unpatched version
> is bigger than the one with your patch:
>
> -bounds_2200000_400000.bnd      2294004
> +bounds_2200000_400000.bnd      2293956
> -bounds_2350000_600000.bnd      1817189
> +bounds_2350000_600000.bnd      1816893
>
> All other 82 files have the same size.
>
>    Thorsten

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Again NullPointerException

WanMil
In reply to this post by WanMil
Gerd,

one more question about the patch:
Are the min/max lat/lon variables used? I think they can be removed but
I fear that I have overseen something important again.... ;-)?

WanMil


>>   >  >  Hi,
>>   >  >
>>   >  >  as a result of previous discussions here is th new patch.
>>   >  >
>>   >  >  http://gis.19327.n5.nabble.com/file/n5471749/verify_boundary_v3.patch
>>   >  >  verify_boundary_v3.patch
>>   >  >
>>   >  >  Changes:
>>   >  >  Verify if rounding errors change the direction of a way
>>   >  >  (clockwise/counterclockwise order), if that happens,
>>   >  >  change the order so that Way.clockwise() returns the wanted result.
>>   >  >
>>   >  >  The patch introduces a new method
>>   >  >
>>   >  >  Java2DConverter.verifiedAreaToShapes()
>>   >  >
>>   >  >  instead of changing the existing
>>   >  >
>>   >  >  Java2DConverter.areaToShapes(area)
>>   >  >
>>   >  >  I did this because Java2DConverter.areaToShapes(area) is called in
>> other
>>   >  >  places and I wanted to avoid side effects. Maybe someone who knows the
>>   >  >  sources in
>>   >  >  PolygonSplitterBase.java and PolygonClipper.java
>>   >  >  can look at this and see if they benefit also from the verified
>> routine?
>>   >  >
>>   >  >  Gerd
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Again NullPointerException

Gerd Petermann
Hi WanMil,

you are right, they are obsolete.

Gerd

WanMil wrote
Gerd,

one more question about the patch:
Are the min/max lat/lon variables used? I think they can be removed but
I fear that I have overseen something important again.... ;-)?

WanMil


>>   >  >  Hi,
>>   >  >
>>   >  >  as a result of previous discussions here is th new patch.
>>   >  >
>>   >  >  http://gis.19327.n5.nabble.com/file/n5471749/verify_boundary_v3.patch
>>   >  >  verify_boundary_v3.patch
>>   >  >
>>   >  >  Changes:
>>   >  >  Verify if rounding errors change the direction of a way
>>   >  >  (clockwise/counterclockwise order), if that happens,
>>   >  >  change the order so that Way.clockwise() returns the wanted result.
>>   >  >
>>   >  >  The patch introduces a new method
>>   >  >
>>   >  >  Java2DConverter.verifiedAreaToShapes()
>>   >  >
>>   >  >  instead of changing the existing
>>   >  >
>>   >  >  Java2DConverter.areaToShapes(area)
>>   >  >
>>   >  >  I did this because Java2DConverter.areaToShapes(area) is called in
>> other
>>   >  >  places and I wanted to avoid side effects. Maybe someone who knows the
>>   >  >  sources in
>>   >  >  PolygonSplitterBase.java and PolygonClipper.java
>>   >  >  can look at this and see if they benefit also from the verified
>> routine?
>>   >  >
>>   >  >  Gerd
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Again NullPointerException

Gerd Petermann
In reply to this post by Thorsten Kukuk
Hi Thorsten,

well, I think that difference is okay. The patch itself doesn't change the number of bytes that are written, but it changes the meaning. The data is read again by the BoundaryPreparer.workoutBoundaryRelations()
method which interprets the data.
A boundary that is counterclockwise is considered to be a hole in an outer area.
Since the patch corrects a few missinterpretations, the workoutBoundaryRelations() will probably produce different results when it tries to find areas that lie within other areas.

Gerd



Thorsten Kukuk wrote
Hi Gerd,

On Sat, Feb 11, Gerd Petermann wrote:

>
> Hi Thorsten,
>
> okay, so you have to wait until someone with a big machine tries it. I may be able to download planet data, but I cannot run mkgmap on a file containing planet boundaries.
> My machine  has max. ~3GB java heap available, that was just enough for europe boundary data.


I tried it now with my DACH extract. The differences are
only small (two files) and this time the unpatched version
is bigger than the one with your patch:

-bounds_2200000_400000.bnd      2294004
+bounds_2200000_400000.bnd      2293956
-bounds_2350000_600000.bnd      1817189
+bounds_2350000_600000.bnd      1816893

All other 82 files have the same size.

  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
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Again NullPointerException

WanMil
Sounds reasonable.

I have comitted the patch with some small changes:
* Removed unused variables
* Added/changed some comments for (my) better understanding
* Reduced the depth of if clauses for better reading
* Removed the duplicate check for the float values. It is not necessary
and works only in very few cases. Interestingly there were lots of cases
where the printed floats were equal but the check did not remove them.
In the end it does not make a difference in the cw/ccw calculation. (The
check for the int values is still there.)

WanMil

> Hi Thorsten,
>
> well, I think that difference is okay. The patch itself doesn't change the
> number of bytes that are written, but it changes the meaning. The data is
> read again by the BoundaryPreparer.workoutBoundaryRelations()
> method which interprets the data.
> A boundary that is counterclockwise is considered to be a hole in an outer
> area.
> Since the patch corrects a few missinterpretations, the
> workoutBoundaryRelations() will probably produce different results when it
> tries to find areas that lie within other areas.
>
> Gerd
>
>
>
>
> Thorsten Kukuk wrote
>>
>> Hi Gerd,
>>
>> On Sat, Feb 11, Gerd Petermann wrote:
>>
>>>
>>> Hi Thorsten,
>>>
>>> okay, so you have to wait until someone with a big machine tries it. I
>>> may be able to download planet data, but I cannot run mkgmap on a file
>>> containing planet boundaries.
>>> My machine  has max. ~3GB java heap available, that was just enough for
>>> europe boundary data.
>>
>>
>> I tried it now with my DACH extract. The differences are
>> only small (two files) and this time the unpatched version
>> is bigger than the one with your patch:
>>
>> -bounds_2200000_400000.bnd      2294004
>> +bounds_2200000_400000.bnd      2293956
>> -bounds_2350000_600000.bnd      1817189
>> +bounds_2350000_600000.bnd      1816893
>>
>> All other 82 files have the same size.
>>
>>    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/PATCH-Again-NullPointerException-tp5471749p5476975.html
> Sent from the Mkgmap Development mailing list archive at Nabble.com.
> _______________________________________________
> mkgmap-dev mailing list
> [hidden email]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Again NullPointerException

Gerd Petermann
Hi WanMil,

thanks, and I like all your changes.
Just one small point: You kept this comment:
"The outline of the polygon is has clockwise order whereas ... "
which I wanted to change to
"The outline of the polygon has clockwise order whereas ... "

Was that intended?

Gerd

> Date: Sun, 12 Feb 2012 21:44:24 +0100

> From: [hidden email]
> To: [hidden email]
> Subject: Re: [mkgmap-dev] [PATCH] Again NullPointerException
>
> Sounds reasonable.
>
> I have comitted the patch with some small changes:
> * Removed unused variables
> * Added/changed some comments for (my) better understanding
> * Reduced the depth of if clauses for better reading
> * Removed the duplicate check for the float values. It is not necessary
> and works only in very few cases. Interestingly there were lots of cases
> where the printed floats were equal but the check did not remove them.
> In the end it does not make a difference in the cw/ccw calculation. (The
> check for the int values is still there.)
>
> WanMil
>
> > Hi Thorsten,
> >
> > well, I think that difference is okay. The patch itself doesn't change the
> > number of bytes that are written, but it changes the meaning. The data is
> > read again by the BoundaryPreparer.workoutBoundaryRelations()
> > method which interprets the data.
> > A boundary that is counterclockwise is considered to be a hole in an outer
> > area.
> > Since the patch corrects a few missinterpretations, the
> > workoutBoundaryRelations() will probably produce different results when it
> > tries to find areas that lie within other areas.
> >
> > Gerd
> >
> >
> >
> >
> > Thorsten Kukuk wrote
> >>
> >> Hi Gerd,
> >>
> >> On Sat, Feb 11, Gerd Petermann wrote:
> >>
> >>>
> >>> Hi Thorsten,
> >>>
> >>> okay, so you have to wait until someone with a big machine tries it. I
> >>> may be able to download planet data, but I cannot run mkgmap on a file
> >>> containing planet boundaries.
> >>> My machine has max. ~3GB java heap available, that was just enough for
> >>> europe boundary data.
> >>
> >>
> >> I tried it now with my DACH extract. The differences are
> >> only small (two files) and this time the unpatched version
> >> is bigger than the one with your patch:
> >>
> >> -bounds_2200000_400000.bnd 2294004
> >> +bounds_2200000_400000.bnd 2293956
> >> -bounds_2350000_600000.bnd 1817189
> >> +bounds_2350000_600000.bnd 1816893
> >>
> >> All other 82 files have the same size.
> >>
> >> 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/PATCH-Again-NullPointerException-tp5471749p5476975.html
> > Sent from the Mkgmap Development mailing list archive at Nabble.com.
> > _______________________________________________
> > mkgmap-dev mailing list
> > [hidden email]
> > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>
> _______________________________________________
> mkgmap-dev mailing list
> [hidden email]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Again NullPointerException

WanMil
Hi Gerd,

> Hi WanMil,
>
> thanks, and I like all your changes.
> Just one small point: You kept this comment:
> "The outline of the polygon is has clockwise order whereas ... "
> which I wanted to change to
> "The outline of the polygon has clockwise order whereas ... "
>
> Was that intended?

No. I just removed the lines between the old areaToShapes method and the
new verifyXXX method so this change was removed by mistake.

WanMil

>
> Gerd
>
>  > Date: Sun, 12 Feb 2012 21:44:24 +0100
>  > From: [hidden email]
>  > To: [hidden email]
>  > Subject: Re: [mkgmap-dev] [PATCH] Again NullPointerException
>  >
>  > Sounds reasonable.
>  >
>  > I have comitted the patch with some small changes:
>  > * Removed unused variables
>  > * Added/changed some comments for (my) better understanding
>  > * Reduced the depth of if clauses for better reading
>  > * Removed the duplicate check for the float values. It is not necessary
>  > and works only in very few cases. Interestingly there were lots of cases
>  > where the printed floats were equal but the check did not remove them.
>  > In the end it does not make a difference in the cw/ccw calculation. (The
>  > check for the int values is still there.)
>  >
>  > WanMil
>  >
>  > > Hi Thorsten,
>  > >
>  > > well, I think that difference is okay. The patch itself doesn't
> change the
>  > > number of bytes that are written, but it changes the meaning. The
> data is
>  > > read again by the BoundaryPreparer.workoutBoundaryRelations()
>  > > method which interprets the data.
>  > > A boundary that is counterclockwise is considered to be a hole in
> an outer
>  > > area.
>  > > Since the patch corrects a few missinterpretations, the
>  > > workoutBoundaryRelations() will probably produce different results
> when it
>  > > tries to find areas that lie within other areas.
>  > >
>  > > Gerd
>  > >
>  > >
>  > >
>  > >
>  > > Thorsten Kukuk wrote
>  > >>
>  > >> Hi Gerd,
>  > >>
>  > >> On Sat, Feb 11, Gerd Petermann wrote:
>  > >>
>  > >>>
>  > >>> Hi Thorsten,
>  > >>>
>  > >>> okay, so you have to wait until someone with a big machine tries
> it. I
>  > >>> may be able to download planet data, but I cannot run mkgmap on a
> file
>  > >>> containing planet boundaries.
>  > >>> My machine has max. ~3GB java heap available, that was just
> enough for
>  > >>> europe boundary data.
>  > >>
>  > >>
>  > >> I tried it now with my DACH extract. The differences are
>  > >> only small (two files) and this time the unpatched version
>  > >> is bigger than the one with your patch:
>  > >>
>  > >> -bounds_2200000_400000.bnd 2294004
>  > >> +bounds_2200000_400000.bnd 2293956
>  > >> -bounds_2350000_600000.bnd 1817189
>  > >> +bounds_2350000_600000.bnd 1816893
>  > >>
>  > >> All other 82 files have the same size.
>  > >>
>  > >> 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/PATCH-Again-NullPointerException-tp5471749p5476975.html
>  > > Sent from the Mkgmap Development mailing list archive at Nabble.com.
>  > > _______________________________________________
>  > > mkgmap-dev mailing list
>  > > [hidden email]
>  > > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>  >
>  > _______________________________________________
>  > mkgmap-dev mailing list
>  > [hidden email]
>  > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>
>
> _______________________________________________
> mkgmap-dev mailing list
> [hidden email]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Again NullPointerException

Thorsten Kukuk
In reply to this post by WanMil

Hi,

On Sun, Feb 12, WanMil wrote:

> Thorsten,
>
> can you check the differences between patched and unpatched version?
>
> There is a tool which compares two boundary directories and saves the
> differences as GPX files.
>
> It is called:
> java -cp mkgmap.jar
> uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryDiff <dir1> <dir2>
>
> It creates a subdirectory named gpx with the differences. That should
> give a quick answer what happened.

Ok, I did that, but don't know how to interpret them.
I have directories with files 0_o.gpx up to 3_o.gpx, which all
contains a trkseg with 4 trkpt.

> Thanks!
> WanMil
>
> >
> > Hi Gerd,
> >
> > On Sat, Feb 11, Gerd Petermann wrote:
> >
> >>
> >> Hi Thorsten,
> >>
> >> okay, so you have to wait until someone with a big machine tries it. I may be able to download planet data, but I cannot run mkgmap on a file containing planet boundaries.
> >> My machine  has max. ~3GB java heap available, that was just enough for europe boundary data.
> >
> >
> > I tried it now with my DACH extract. The differences are
> > only small (two files) and this time the unpatched version
> > is bigger than the one with your patch:
> >
> > -bounds_2200000_400000.bnd      2294004
> > +bounds_2200000_400000.bnd      2293956
> > -bounds_2350000_600000.bnd      1817189
> > +bounds_2350000_600000.bnd      1816893
> >
> > All other 82 files have the same size.
> >
> >    Thorsten
>
> _______________________________________________
> mkgmap-dev mailing list
> [hidden email]
> 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
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Again NullPointerException

Gerd Petermann
Hi Thorsten,

If I got that right, you should have the files either in subdir removed, the program considers the
2nd dir in the parameter list to be the newer one:
java -cp mkgmap.jar uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryDiff <dir1> <dir2>

The four gpx files describe the areas that are covered (I prefer JOSM to look at them, but
many orher tools are available), the _o at the end of the file name means that the area is an outer
area (_i would mean a hole within an other area)

Does that help?

Gerd

> Date: Sun, 12 Feb 2012 23:26:36 +0100
> From: [hidden email]

> To: [hidden email]
> Subject: Re: [mkgmap-dev] [PATCH] Again NullPointerException
>
>
> Hi,
>
> On Sun, Feb 12, WanMil wrote:
>
> > Thorsten,
> >
> > can you check the differences between patched and unpatched version?
> >
> > There is a tool which compares two boundary directories and saves the
> > differences as GPX files.
> >
> > It is called:
> > java -cp mkgmap.jar
> > uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryDiff <dir1> <dir2>
> >
> > It creates a subdirectory named gpx with the differences. That should
> > give a quick answer what happened.
>
> Ok, I did that, but don't know how to interpret them.
> I have directories with files 0_o.gpx up to 3_o.gpx, which all
> contains a trkseg with 4 trkpt.
>
> > Thanks!
> > WanMil
> >
> > >
> > > Hi Gerd,
> > >
> > > On Sat, Feb 11, Gerd Petermann wrote:
> > >
> > >>
> > >> Hi Thorsten,
> > >>
> > >> okay, so you have to wait until someone with a big machine tries it. I may be able to download planet data, but I cannot run mkgmap on a file containing planet boundaries.
> > >> My machine has max. ~3GB java heap available, that was just enough for europe boundary data.
> > >
> > >
> > > I tried it now with my DACH extract. The differences are
> > > only small (two files) and this time the unpatched version
> > > is bigger than the one with your patch:
> > >
> > > -bounds_2200000_400000.bnd 2294004
> > > +bounds_2200000_400000.bnd 2293956
> > > -bounds_2350000_600000.bnd 1817189
> > > +bounds_2350000_600000.bnd 1816893
> > >
> > > All other 82 files have the same size.
> > >
> > > Thorsten
> >
> > _______________________________________________
> > mkgmap-dev mailing list
> > [hidden email]
> > 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
> [hidden email]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
12