[mkgmap-dev] Commit r4464: merge the is-in branch

2020-03-06 Thread svn commit
Version mkgmap-r4464 was committed by gerd on Sat, 07 Mar 2020

merge the is-in branch
- adds the new style function is_in(), see style documentation for details.
- the ResidentialHook is disabled if the style doesn't explicitely use 
mkgmap:residential 

http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap=4464
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


[mkgmap-dev] Commit r4463: minor documentation update (options_v3.patch by Ticker Berkin)

2020-03-06 Thread svn commit
Version mkgmap-r4463 was committed by gerd on Sat, 07 Mar 2020

minor documentation update (options_v3.patch by Ticker Berkin)
Changes are mostly adding some missing blank lines between options and
removing some excess ones. Also fix a line folding problem that show on
the web-site and remove trailing spaces.


http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap=4463
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] options.txt tidy-up

2020-03-06 Thread Ticker Berkin
Sorry - corrected patch attached

Ticker

On Fri, 2020-03-06 at 09:33 +, Gerd Petermann wrote:
> Hi Ticker,
> 
> please check, options_v2.patch changes several other files.
> 
> Gerd
> 
> 
> Von: mkgmap-dev  im Auftrag
> von Ticker Berkin 
> Gesendet: Freitag, 6. März 2020 10:30
> An: Development list for mkgmap
> Betreff: Re: [mkgmap-dev] options.txt tidy-up
> 
> Yes
> 
> Here it is
> 
> Ticker
> 
> On Fri, 2020-03-06 at 08:15 +, Gerd Petermann wrote:
> > Hi Ticker,
> > 
> > so I wait for another patch, right?
> > 
> > Gerd
> > 
> > 
> > Von: mkgmap-dev  im Auftrag
> > von Ticker Berkin 
> > Gesendet: Donnerstag, 5. März 2020 19:38
> > An: Development list for mkgmap
> > Betreff: Re: [mkgmap-dev] options.txt tidy-up
> > 
> > Hi Mike
> > 
> > It looks like buildOptions, except for , trims trailing spaces
> > and
> > folds lines sensibly. For , the less it does the better, so I
> > don't think it should be changed.
> > 
> > The trailing spaces don't show on the web-site because of standard
> > html
> > processing, but they are output to the page. I deleted them on
> > principle!
> > 
> > The web-site processing does have a problem with lines that start
> > with
> > a '; it doesn't put in a separating space. I've just noticed 1 that
> > I
> > m
> > issed.
> > 
> > Ticker
> > 
> > On Thu, 2020-03-05 at 17:41 +, Mike Baggaley wrote:
> > > HI Ticker, I see that the options file has a few spaces on the
> > > end
> > > of
> > > lines that you have also corrected. These probably need a tweak
> > > to
> > > the buildoptions code to prevent them from being copied from
> > > options.txt. They seem to be occurring on blank lines and lines
> > > contained within  .
> > > 
> > > Regards,
> > > Mike
> > > 
> > > -Original Message-
> > > From: Ticker Berkin [mailto:rwb-mkg...@jagit.co.uk]
> > > Sent: 05 March 2020 12:15
> > > To: mkgmap development 
> > > Subject: [mkgmap-dev] options.txt tidy-up
> > > 
> > > Hi Gerd
> > > 
> > > I've had some tidy-ups to doc/options.txt sitting around for a
> > > couple
> > > of weeks and just got merge problems with the latest changes, so
> > > I've
> > > merged manually and attach patch.
> > > 
> > > Changes are mostly adding some missing blank lines between
> > > options
> > > and
> > > removing some excess ones. Also fix a line folding problem that
> > > show
> > > on
> > > the web-site and remove trailing spaces.
> > > 
> > > Ticker
> > > 
> > > ___
> > > 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-devIndex: doc/options.txt
===
--- doc/options.txt	(revision 4462)
+++ doc/options.txt	(working copy)
@@ -19,9 +19,10 @@
 need to use this option to allow more memory to be allocated to the Java
 heap. Typically, mkgmap requires about 500MB per core, so an 8-core
 processor might need to specify -Xmx4g - note there is no space or
-equals sign in the option.  
+equals sign in the option.
 
 ;-enableassertions
+;-ea
 :	Causes an error to be thrown if an assertion written in the mkgmap
 code is evaluated as not true. This is useful in detecting bugs in the
 mkgmap code.
@@ -35,7 +36,7 @@
 === Mkgmap options ===
 
 The order of the options is significant in that options only apply
-to subsequent input files. If you are using splitter, you probably 
+to subsequent input files. If you are using splitter, you probably
 will need to put most of your options before '-c template.args'
 (this file is generated by splitter).
 
@@ -47,7 +48,7 @@
 : 	Display help on the given topic. If the topic is omitted then
 general help information is displayed, the same as in help=help.
 
-;--version 
+;--version
 : 	Write program version to stderr.
 
 === File options ===
@@ -55,7 +56,7 @@
 ;filename
 ;--input-file=filename
 : 	Read input data from the given file.  This option (or just a
-filename) may be specified more than once. Make sure you set all 
+filename) may be specified more than once. Make sure you set all
 wanted options before this.
 
 ;--gmapsupp
@@ -79,8 +80,8 @@
 
 Lines beginning with a # character are ignored and can be used as
 comments.  Any command line option can be specified, however the
-leading '--' must be omitted.  The short option names with a single
-'-' cannot be used, simply use the long name instead. 
+leading '--' must be omitted.
+The short option names with a single '-' cannot be used, simply use the long name instead.
 
 ;--output-dir=directory
 :	Specify the directory in which all output files are written. It defaults
@@ -144,7 +145,7 @@
 gmapsupp.img file so that address search will work on a GPS
 device.
 
-If both the --gmapsupp 

Re: [mkgmap-dev] options.txt tidy-up

2020-03-06 Thread Gerd Petermann
Hi Ticker,

please check, options_v2.patch changes several other files.

Gerd


Von: mkgmap-dev  im Auftrag von Ticker 
Berkin 
Gesendet: Freitag, 6. März 2020 10:30
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] options.txt tidy-up

Yes

Here it is

Ticker

On Fri, 2020-03-06 at 08:15 +, Gerd Petermann wrote:
> Hi Ticker,
>
> so I wait for another patch, right?
>
> Gerd
>
> 
> Von: mkgmap-dev  im Auftrag
> von Ticker Berkin 
> Gesendet: Donnerstag, 5. März 2020 19:38
> An: Development list for mkgmap
> Betreff: Re: [mkgmap-dev] options.txt tidy-up
>
> Hi Mike
>
> It looks like buildOptions, except for , trims trailing spaces
> and
> folds lines sensibly. For , the less it does the better, so I
> don't think it should be changed.
>
> The trailing spaces don't show on the web-site because of standard
> html
> processing, but they are output to the page. I deleted them on
> principle!
>
> The web-site processing does have a problem with lines that start
> with
> a '; it doesn't put in a separating space. I've just noticed 1 that I
> m
> issed.
>
> Ticker
>
> On Thu, 2020-03-05 at 17:41 +, Mike Baggaley wrote:
> > HI Ticker, I see that the options file has a few spaces on the end
> > of
> > lines that you have also corrected. These probably need a tweak to
> > the buildoptions code to prevent them from being copied from
> > options.txt. They seem to be occurring on blank lines and lines
> > contained within  .
> >
> > Regards,
> > Mike
> >
> > -Original Message-
> > From: Ticker Berkin [mailto:rwb-mkg...@jagit.co.uk]
> > Sent: 05 March 2020 12:15
> > To: mkgmap development 
> > Subject: [mkgmap-dev] options.txt tidy-up
> >
> > Hi Gerd
> >
> > I've had some tidy-ups to doc/options.txt sitting around for a
> > couple
> > of weeks and just got merge problems with the latest changes, so
> > I've
> > merged manually and attach patch.
> >
> > Changes are mostly adding some missing blank lines between options
> > and
> > removing some excess ones. Also fix a line folding problem that
> > show
> > on
> > the web-site and remove trailing spaces.
> >
> > Ticker
> >
> > ___
> > 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
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] Work on is_in branch

2020-03-06 Thread Ticker Berkin
Hi Gerd

Nothing else I want to change. I keep thinking there must be other ways
to do the lineInShape logic, but I think it has taken enough time
already.

Ticker

On Fri, 2020-03-06 at 08:16 +, Gerd Petermann wrote:
> Hi Ticker,
> 
> My concerns regarding a merge to trunk are resolved. Anything else
> you want to change?
> 
> Gerd
> 
> 
> 
> Von: mkgmap-dev  im Auftrag
> von Gerd Petermann 
> Gesendet: Dienstag, 3. März 2020 15:22
> An: Ticker Berkin; Development list for mkgmap
> Betreff: Re: [mkgmap-dev] Work on is_in branch
> 
> Hi Ticker,
> 
> nice :)
> Committed with r4461, with small changes.
> 
> This even allows to change the test case for lamp4 from expected="?"
> to expected="2" (ON).
> 
> reg. the distance calculations: I don't remember the details and
> maybe all is wrong.
> 
> See svn log for r : 
> http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap=
> and search the archives for "Great Britain National Grid".
> 
> The math behind projections and distance formulas is too complex for
> me.
> 
> Gerd
> 
> 
> Von: mkgmap-dev  im Auftrag
> von Ticker Berkin 
> Gesendet: Dienstag, 3. März 2020 14:24
> An: Development list for mkgmap
> Betreff: Re: [mkgmap-dev] Work on is_in branch
> 
> Hi Gerd
> 
> Patch attached:
> 
> - inherits your is_in-function_v14.patch
> 
> - adds Math.round to Coord.makeBetweenPoint(); Is this how you
> indented?
> 
> - removes IsInUtil.insidePolygon() and changes callers to use
> isPointInShape()
> 
> - adds ON tolerance to isPointInShape() - I couldn't work out how to
> do
> this with the winding algo, so changed it to crossing-point, which is
> fine for mkgmap polygons.
> 
> - add some more tolerances to isLineInShape
> 
> - isLineInShape had comment:
> 
> // it is unlikely but not impossible that pTest is on boundary :(
> 
> and it returned the wrong result if it was. This contributed to the
> difficulties with b14 (and b19). I've fixed it and, I think, improved
> and simplified the running status setting
> 
> - fix spelling of rhumLine to rhumbLine
> 
> There are still a couple of places that have complicated distance
> calculation and point insertion using, bearings, rhumbline, meter
> conversion but I don't think it is worth re-implementing them for
> this.
> 
> I'm slightly surprised how much use there is of
> bearing/rhumbLine/Mercator projection calculations. I think real
> distance/metre calcs should be "great circle" and internal poly/line
> chopping, testing etc should be high-precision polar coords.
> 
> Ticker
> 
> On Thu, 2020-02-27 at 19:36 +, Gerd Petermann wrote:
> > Hi Ticker,
> > 
> > if you see a way to change the algo just do it.
> > I've just noticed that I forgot to commit a change  in
> > Coord.makeBetweenPoint().
> > This routine should use Math.round. Will reduce the error by 50%,
> > right?
> > 
> > Gerd
> > 
> > 
> > Von: mkgmap-dev  im Auftrag
> > von Ticker Berkin 
> > Gesendet: Donnerstag, 27. Februar 2020 20:24
> > An: Development list for mkgmap
> > Betreff: Re: [mkgmap-dev] Work on is_in branch
> > 
> > Hi Gerd
> > 
> > Looking at the distance calculations to compare with EPS (ie very
> > small), wouldn't it be much simpler and clearer just to calculate
> > it
> > as
> > highPrecisionSquared units, not bothering with degrees/radians,
> > rhumb
> > -line, metre conversion etc. Then EPS would be 4.
> > 
> > Then, considering IsInUtil.insidePolgon and can it be changed to
> > have
> > some tolerance and maybe changing the interface to return
> > IN/ON/OUT,
> > it
> > looks like it will stop, returning onBoundary, if there is a
> > polygon
> > segment that 'aims at' the point.
> > 
> > Ticker
> ___
> 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

Re: [mkgmap-dev] options.txt tidy-up

2020-03-06 Thread Ticker Berkin
Yes

Here it is

Ticker

On Fri, 2020-03-06 at 08:15 +, Gerd Petermann wrote:
> Hi Ticker,
> 
> so I wait for another patch, right?
> 
> Gerd
> 
> 
> Von: mkgmap-dev  im Auftrag
> von Ticker Berkin 
> Gesendet: Donnerstag, 5. März 2020 19:38
> An: Development list for mkgmap
> Betreff: Re: [mkgmap-dev] options.txt tidy-up
> 
> Hi Mike
> 
> It looks like buildOptions, except for , trims trailing spaces
> and
> folds lines sensibly. For , the less it does the better, so I
> don't think it should be changed.
> 
> The trailing spaces don't show on the web-site because of standard
> html
> processing, but they are output to the page. I deleted them on
> principle!
> 
> The web-site processing does have a problem with lines that start
> with
> a '; it doesn't put in a separating space. I've just noticed 1 that I
> m
> issed.
> 
> Ticker
> 
> On Thu, 2020-03-05 at 17:41 +, Mike Baggaley wrote:
> > HI Ticker, I see that the options file has a few spaces on the end
> > of
> > lines that you have also corrected. These probably need a tweak to
> > the buildoptions code to prevent them from being copied from
> > options.txt. They seem to be occurring on blank lines and lines
> > contained within  .
> > 
> > Regards,
> > Mike
> > 
> > -Original Message-
> > From: Ticker Berkin [mailto:rwb-mkg...@jagit.co.uk]
> > Sent: 05 March 2020 12:15
> > To: mkgmap development 
> > Subject: [mkgmap-dev] options.txt tidy-up
> > 
> > Hi Gerd
> > 
> > I've had some tidy-ups to doc/options.txt sitting around for a
> > couple
> > of weeks and just got merge problems with the latest changes, so
> > I've
> > merged manually and attach patch.
> > 
> > Changes are mostly adding some missing blank lines between options
> > and
> > removing some excess ones. Also fix a line folding problem that
> > show
> > on
> > the web-site and remove trailing spaces.
> > 
> > Ticker
> > 
> > ___
> > 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-devIndex: doc/options.txt
===
--- doc/options.txt	(revision 4462)
+++ doc/options.txt	(working copy)
@@ -19,9 +19,10 @@
 need to use this option to allow more memory to be allocated to the Java
 heap. Typically, mkgmap requires about 500MB per core, so an 8-core
 processor might need to specify -Xmx4g - note there is no space or
-equals sign in the option.  
+equals sign in the option.
 
 ;-enableassertions
+;-ea
 :	Causes an error to be thrown if an assertion written in the mkgmap
 code is evaluated as not true. This is useful in detecting bugs in the
 mkgmap code.
@@ -35,7 +36,7 @@
 === Mkgmap options ===
 
 The order of the options is significant in that options only apply
-to subsequent input files. If you are using splitter, you probably 
+to subsequent input files. If you are using splitter, you probably
 will need to put most of your options before '-c template.args'
 (this file is generated by splitter).
 
@@ -47,7 +48,7 @@
 : 	Display help on the given topic. If the topic is omitted then
 general help information is displayed, the same as in help=help.
 
-;--version 
+;--version
 : 	Write program version to stderr.
 
 === File options ===
@@ -55,7 +56,7 @@
 ;filename
 ;--input-file=filename
 : 	Read input data from the given file.  This option (or just a
-filename) may be specified more than once. Make sure you set all 
+filename) may be specified more than once. Make sure you set all
 wanted options before this.
 
 ;--gmapsupp
@@ -79,8 +80,8 @@
 
 Lines beginning with a # character are ignored and can be used as
 comments.  Any command line option can be specified, however the
-leading '--' must be omitted.  The short option names with a single
-'-' cannot be used, simply use the long name instead. 
+leading '--' must be omitted.
+The short option names with a single '-' cannot be used, simply use the long name instead.
 
 ;--output-dir=directory
 :	Specify the directory in which all output files are written. It defaults
@@ -144,7 +145,7 @@
 gmapsupp.img file so that address search will work on a GPS
 device.
 
-If both the --gmapsupp and any of --tdbfile, --gmapi, or --nsis options 
+If both the --gmapsupp and any of --tdbfile, --gmapi, or --nsis options
 are given alongside the --index option, then both indexes will be created.
 Note that this will require roughly twice as much memory.
 
@@ -188,17 +189,17 @@
 of special characters in the road labels to mark the beginning and end of
 the important part. In combination with option --split-name-index
 only the words in the important part are indexed.
-
+
 :There are two main effects of this option:
 ::	- On the PC, when zooming out, the name 'Rue de la Concorde' is 

Re: [mkgmap-dev] Work on is_in branch

2020-03-06 Thread Gerd Petermann
Hi Ticker,

My concerns regarding a merge to trunk are resolved. Anything else you want to 
change?

Gerd



Von: mkgmap-dev  im Auftrag von Gerd 
Petermann 
Gesendet: Dienstag, 3. März 2020 15:22
An: Ticker Berkin; Development list for mkgmap
Betreff: Re: [mkgmap-dev] Work on is_in branch

Hi Ticker,

nice :)
Committed with r4461, with small changes.

This even allows to change the test case for lamp4 from expected="?" to 
expected="2" (ON).

reg. the distance calculations: I don't remember the details and maybe all is 
wrong.

See svn log for r : 
http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap=
and search the archives for "Great Britain National Grid".

The math behind projections and distance formulas is too complex for me.

Gerd


Von: mkgmap-dev  im Auftrag von Ticker 
Berkin 
Gesendet: Dienstag, 3. März 2020 14:24
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] Work on is_in branch

Hi Gerd

Patch attached:

- inherits your is_in-function_v14.patch

- adds Math.round to Coord.makeBetweenPoint(); Is this how you
indented?

- removes IsInUtil.insidePolygon() and changes callers to use
isPointInShape()

- adds ON tolerance to isPointInShape() - I couldn't work out how to do
this with the winding algo, so changed it to crossing-point, which is
fine for mkgmap polygons.

- add some more tolerances to isLineInShape

- isLineInShape had comment:

// it is unlikely but not impossible that pTest is on boundary :(

and it returned the wrong result if it was. This contributed to the
difficulties with b14 (and b19). I've fixed it and, I think, improved
and simplified the running status setting

- fix spelling of rhumLine to rhumbLine

There are still a couple of places that have complicated distance
calculation and point insertion using, bearings, rhumbline, meter
conversion but I don't think it is worth re-implementing them for this.

I'm slightly surprised how much use there is of
bearing/rhumbLine/Mercator projection calculations. I think real
distance/metre calcs should be "great circle" and internal poly/line
chopping, testing etc should be high-precision polar coords.

Ticker

On Thu, 2020-02-27 at 19:36 +, Gerd Petermann wrote:
> Hi Ticker,
>
> if you see a way to change the algo just do it.
> I've just noticed that I forgot to commit a change  in
> Coord.makeBetweenPoint().
> This routine should use Math.round. Will reduce the error by 50%,
> right?
>
> Gerd
>
> 
> Von: mkgmap-dev  im Auftrag
> von Ticker Berkin 
> Gesendet: Donnerstag, 27. Februar 2020 20:24
> An: Development list for mkgmap
> Betreff: Re: [mkgmap-dev] Work on is_in branch
>
> Hi Gerd
>
> Looking at the distance calculations to compare with EPS (ie very
> small), wouldn't it be much simpler and clearer just to calculate it
> as
> highPrecisionSquared units, not bothering with degrees/radians, rhumb
> -line, metre conversion etc. Then EPS would be 4.
>
> Then, considering IsInUtil.insidePolgon and can it be changed to have
> some tolerance and maybe changing the interface to return IN/ON/OUT,
> it
> looks like it will stop, returning onBoundary, if there is a polygon
> segment that 'aims at' the point.
>
> Ticker
___
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


Re: [mkgmap-dev] options.txt tidy-up

2020-03-06 Thread Gerd Petermann
Hi Ticker,

so I wait for another patch, right?

Gerd


Von: mkgmap-dev  im Auftrag von Ticker 
Berkin 
Gesendet: Donnerstag, 5. März 2020 19:38
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] options.txt tidy-up

Hi Mike

It looks like buildOptions, except for , trims trailing spaces and
folds lines sensibly. For , the less it does the better, so I
don't think it should be changed.

The trailing spaces don't show on the web-site because of standard html
processing, but they are output to the page. I deleted them on
principle!

The web-site processing does have a problem with lines that start with
a '; it doesn't put in a separating space. I've just noticed 1 that I m
issed.

Ticker

On Thu, 2020-03-05 at 17:41 +, Mike Baggaley wrote:
> HI Ticker, I see that the options file has a few spaces on the end of
> lines that you have also corrected. These probably need a tweak to
> the buildoptions code to prevent them from being copied from
> options.txt. They seem to be occurring on blank lines and lines
> contained within  .
>
> Regards,
> Mike
>
> -Original Message-
> From: Ticker Berkin [mailto:rwb-mkg...@jagit.co.uk]
> Sent: 05 March 2020 12:15
> To: mkgmap development 
> Subject: [mkgmap-dev] options.txt tidy-up
>
> Hi Gerd
>
> I've had some tidy-ups to doc/options.txt sitting around for a couple
> of weeks and just got merge problems with the latest changes, so I've
> merged manually and attach patch.
>
> Changes are mostly adding some missing blank lines between options
> and
> removing some excess ones. Also fix a line folding problem that show
> on
> the web-site and remove trailing spaces.
>
> Ticker
>
> ___
> 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
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev