[mkgmap-dev] dead end check patch v2

2020-02-26 Thread Mike Baggaley
Hi Gerd, 

Please find attached the alternate patch for improving the dead end check,
which is fully backwards compatible. This adds a new command line option --
dead-ends which lists the tags and optional values that are to be considered
to be valid dead ends when found on the node at the end of a way. The
default is --dead-ends=fixme,FIXME.

Regards,
Mike


deadendcheck2.patch
Description: Binary data
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Re: [mkgmap-dev] dead end check patch

2020-02-26 Thread Mike Baggaley
Hi Gerd, 

I doubt whether many people would be overly concerned if a the combination
of OSM data and style results in a dead end for (for example) buses but not
for cars, and I don't think anyone would expect to be able to accurately
produce warnings down to that level.

I don't understand the relevance of the link to nabble.com regarding
backwards compatibility. It seems to be a discussion between you and Marko
back in 2013 about using the fixme tag to identify  nodes that are to be
omitted from the dead end checks.

I cannot see how mkgmap:dead-end-check=no can be evaluated without changing
the code. For my use, I do not want ways with fixme nodes to be omitted from
the report, just those with amenity=parking_entrance, railway=car_shuttle or
railway=rolling_highway.

I am happy to post my alternative solution, which I actually developed
first, but then changed in favour of the one I have already posted. The
alternative is fully backwards compatible.

Regards,
Mike

-Original Message-
From: Gerd Petermann [mailto:gpetermann_muenc...@hotmail.com] 
Sent: 26 February 2020 13:52
To: Mike Baggaley ; 'Development list for mkgmap'

Subject: AW: [mkgmap-dev] dead end check patch

Hi Mike,

the problem with the implemented check is that Garmin maps are typically
produced for a limited set of vehicles.

Reg. backwards compatibility:
see
http://gis.19327.n8.nabble.com/Suppressing-dead-end-checks-for-parking-entra
nce-exit-tp5750968.html

I see no reason to change the existing solution in the java code, but we may
add the evaluation of
mkgmap:dead-end-check=no in addition to fixme=* or FIXME=*.

Gerd


Von: mkgmap-dev  im Auftrag von Mike
Baggaley 
Gesendet: Mittwoch, 26. Februar 2020 13:47
An: 'Development list for mkgmap'
Betreff: Re: [mkgmap-dev] dead end check patch

Hi Gerd,

Why would you want to remove the dead ends check code? I accept that there
are probably other tools that can find these errors, but it is definitely
beneficial to be able to report or these during the process of building a
Garmin map. I note that removing the dead ends check would also be not
backwards compatible.

The existing solution is hard coded to look for fixme=* and FIXME=*, which
is a poor solution and not documented. The code already uses
mkgmap:dead-end-check for ways that should be ignored and to me at least it
makes much more sense to also use this for nodes, which makes it much more
flexible. I included a change to the default style so that it is backwards
compatible (with an enhancement of also causing certain known dead ends to
be omitted). I do not think that changes to mkgmap always need to be 100%
backward compatible. Its future development will be massively constrained by
enforcing backwards compatibility. None of the styles supplied with mkgmap
set a fixme value, so the only people who will be affected are those who
have their own styles who are also using --report-dead-ends. This is going
to be a very small number and they must be reasonably knowledgeable about
mkgmap to be doing that. Hence I consider it to be a very small hardship for
them to tweak their build process with a one line change to their style.

I had considered as an alternative a new command line option as follows:
--dead-ends[=key[=value]][,key[=value]...]
Specify a list of keys and optional values that should be considered
to be valid dead ends when found on the node at the end of a way. Ways with
nodes matching any of the items in the list will not be reported as dead
ends.
If no value or * is specified for value then presence of the key alone will
cause the dead end check to be skipped. The default is
--dead-ends=fixme,FIXME.

This is backwards compatible, but to me the use of the mkgmap:
dead-end-check in the style file is a more elegant solution.

Regards,
Mike

-Original Message-
From: Gerd Petermann [mailto:gpetermann_muenc...@hotmail.com]
Sent: 26 February 2020 09:21
To: 'Development list for mkgmap' 
Subject: Re: [mkgmap-dev] dead end check patch

Hi Mike,

you change is not compatible with existing styles which set fixme=* or
FIXME=*
I'd rather remove the code for dead-end check. I see no need for this in
mkgmap.

Gerd


Von: mkgmap-dev  im Auftrag von Mike
Baggaley 
Gesendet: Mittwoch, 26. Februar 2020 09:11
An: 'Development list for mkgmap'
Betreff: [mkgmap-dev] dead end check patch

Hi Gerd,

please find attached a small patch that improves the dead end check. It
amends the code that looks for a fixme tag on a node to make it look for a
mkgmap:dead-end-check tag instead, and adds a line to the points file
setting mkgmap:dead-end-check=no for nodes with amenity=parking_entrance,
railway=car_shuttle, railway=rolling_highway, fixme=* or FIXME=*.

Please review.

Thanks,
Mike




___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] dead end check patch

2020-02-26 Thread Gerd Petermann
Hi Mike,

the problem with the implemented check is that Garmin maps are typically 
produced for a limited set of vehicles.

Reg. backwards compatibility:
see 
http://gis.19327.n8.nabble.com/Suppressing-dead-end-checks-for-parking-entrance-exit-tp5750968.html

I see no reason to change the existing solution in the java code, but we may 
add the evaluation of
mkgmap:dead-end-check=no in addition to fixme=* or FIXME=*.

Gerd


Von: mkgmap-dev  im Auftrag von Mike 
Baggaley 
Gesendet: Mittwoch, 26. Februar 2020 13:47
An: 'Development list for mkgmap'
Betreff: Re: [mkgmap-dev] dead end check patch

Hi Gerd,

Why would you want to remove the dead ends check code? I accept that there
are probably other tools that can find these errors, but it is definitely
beneficial to be able to report or these during the process of building a
Garmin map. I note that removing the dead ends check would also be not
backwards compatible.

The existing solution is hard coded to look for fixme=* and FIXME=*, which
is a poor solution and not documented. The code already uses
mkgmap:dead-end-check for ways that should be ignored and to me at least it
makes much more sense to also use this for nodes, which makes it much more
flexible. I included a change to the default style so that it is backwards
compatible (with an enhancement of also causing certain known dead ends to
be omitted). I do not think that changes to mkgmap always need to be 100%
backward compatible. Its future development will be massively constrained by
enforcing backwards compatibility. None of the styles supplied with mkgmap
set a fixme value, so the only people who will be affected are those who
have their own styles who are also using --report-dead-ends. This is going
to be a very small number and they must be reasonably knowledgeable about
mkgmap to be doing that. Hence I consider it to be a very small hardship for
them to tweak their build process with a one line change to their style.

I had considered as an alternative a new command line option as follows:
--dead-ends[=key[=value]][,key[=value]...]
Specify a list of keys and optional values that should be considered
to be valid dead ends when found on the node at the end of a way. Ways with
nodes matching any of the items in the list will not be reported as dead
ends.
If no value or * is specified for value then presence of the key alone will
cause the dead end check to be skipped. The default is
--dead-ends=fixme,FIXME.

This is backwards compatible, but to me the use of the mkgmap:
dead-end-check in the style file is a more elegant solution.

Regards,
Mike

-Original Message-
From: Gerd Petermann [mailto:gpetermann_muenc...@hotmail.com]
Sent: 26 February 2020 09:21
To: 'Development list for mkgmap' 
Subject: Re: [mkgmap-dev] dead end check patch

Hi Mike,

you change is not compatible with existing styles which set fixme=* or
FIXME=*
I'd rather remove the code for dead-end check. I see no need for this in
mkgmap.

Gerd


Von: mkgmap-dev  im Auftrag von Mike
Baggaley 
Gesendet: Mittwoch, 26. Februar 2020 09:11
An: 'Development list for mkgmap'
Betreff: [mkgmap-dev] dead end check patch

Hi Gerd,

please find attached a small patch that improves the dead end check. It
amends the code that looks for a fixme tag on a node to make it look for a
mkgmap:dead-end-check tag instead, and adds a line to the points file
setting mkgmap:dead-end-check=no for nodes with amenity=parking_entrance,
railway=car_shuttle, railway=rolling_highway, fixme=* or FIXME=*.

Please review.

Thanks,
Mike




___
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] dead end check patch

2020-02-26 Thread Mike Baggaley
Hi Gerd, 

Why would you want to remove the dead ends check code? I accept that there
are probably other tools that can find these errors, but it is definitely
beneficial to be able to report or these during the process of building a
Garmin map. I note that removing the dead ends check would also be not
backwards compatible.

The existing solution is hard coded to look for fixme=* and FIXME=*, which
is a poor solution and not documented. The code already uses
mkgmap:dead-end-check for ways that should be ignored and to me at least it
makes much more sense to also use this for nodes, which makes it much more
flexible. I included a change to the default style so that it is backwards
compatible (with an enhancement of also causing certain known dead ends to
be omitted). I do not think that changes to mkgmap always need to be 100%
backward compatible. Its future development will be massively constrained by
enforcing backwards compatibility. None of the styles supplied with mkgmap
set a fixme value, so the only people who will be affected are those who
have their own styles who are also using --report-dead-ends. This is going
to be a very small number and they must be reasonably knowledgeable about
mkgmap to be doing that. Hence I consider it to be a very small hardship for
them to tweak their build process with a one line change to their style.

I had considered as an alternative a new command line option as follows:
--dead-ends[=key[=value]][,key[=value]...]
Specify a list of keys and optional values that should be considered
to be valid dead ends when found on the node at the end of a way. Ways with
nodes matching any of the items in the list will not be reported as dead
ends.
If no value or * is specified for value then presence of the key alone will
cause the dead end check to be skipped. The default is
--dead-ends=fixme,FIXME.

This is backwards compatible, but to me the use of the mkgmap:
dead-end-check in the style file is a more elegant solution.

Regards,
Mike

-Original Message-
From: Gerd Petermann [mailto:gpetermann_muenc...@hotmail.com] 
Sent: 26 February 2020 09:21
To: 'Development list for mkgmap' 
Subject: Re: [mkgmap-dev] dead end check patch

Hi Mike,

you change is not compatible with existing styles which set fixme=* or
FIXME=*
I'd rather remove the code for dead-end check. I see no need for this in
mkgmap.

Gerd


Von: mkgmap-dev  im Auftrag von Mike
Baggaley 
Gesendet: Mittwoch, 26. Februar 2020 09:11
An: 'Development list for mkgmap'
Betreff: [mkgmap-dev] dead end check patch

Hi Gerd,

please find attached a small patch that improves the dead end check. It
amends the code that looks for a fixme tag on a node to make it look for a
mkgmap:dead-end-check tag instead, and adds a line to the points file
setting mkgmap:dead-end-check=no for nodes with amenity=parking_entrance,
railway=car_shuttle, railway=rolling_highway, fixme=* or FIXME=*.

Please review.

Thanks,
Mike




___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] dead end check patch

2020-02-26 Thread Gerd Petermann
Hi Mike,

you change is not compatible with existing styles which set fixme=* or FIXME=*
I'd rather remove the code for dead-end check. I see no need for this in mkgmap.

Gerd


Von: mkgmap-dev  im Auftrag von Mike 
Baggaley 
Gesendet: Mittwoch, 26. Februar 2020 09:11
An: 'Development list for mkgmap'
Betreff: [mkgmap-dev] dead end check patch

Hi Gerd,

please find attached a small patch that improves the dead end check. It
amends the code that looks for a fixme tag on a node to make it look for a
mkgmap:dead-end-check tag instead, and adds a line to the points file
setting mkgmap:dead-end-check=no for nodes with amenity=parking_entrance,
railway=car_shuttle, railway=rolling_highway, fixme=* or FIXME=*.

Please review.

Thanks,
Mike


___
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-02-26 Thread Gerd Petermann
Hi Ticker,

no idea how the tool chain for the pdf works.

There are some commented code blocks and Eclipse and SonarLint warn about 
several missing default statements, e.g.
Complete cases by adding the missing enum constants or add a default case to 
this switch.   IsInFunction.java   
mkgmap/src/uk/me/parabola/mkgmap/osmstyle/function  line 164
SonarLint On-The-Fly Issue

Reg. the TODO comment
// problem with test b14 on the cut polygons and isLineInShape that goes away 
when merged. TODO: investigate sometime
Maybe the reason is that we create a Coord instance at the place where the 
polygon is split. Due to the rounding errors this point can be a 1-2 mm inside 
or outside the original inner polygon. Merging should not change the result 
unless the added point is removed by the merge. In that case I would assume 
that there were no rounding errors.

Some log statements might be removed or changed to debug level?
log.info("done", System.identityHashCode(this), hasIn, hasOn, hasOut);

Gerd


Von: mkgmap-dev  im Auftrag von Ticker 
Berkin 
Gesendet: Dienstag, 25. Februar 2020 10:27
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] Work on is_in branch

Hi Gerd

I think this is about ready for release.

There is a slight problem with the layout in the Style Manual in that
the width of "is_in(tag,value,method)" causes it to run into the
Node/Way/Relation flags. If there was a way to put the function args
down the first column it would fix it, but I have no idea of the rules
of the formatting language. What are the tools used to transform
doc/styles/*.txt to the style-manual.pdf?

I'm not going to be able to do any complex line->polygon in/on/out
debugging in the next few days and it seems to work well for most
cases.

Ticker

On Mon, 2020-02-24 at 12:50 +, Ticker Berkin wrote:
> Hi Gerd
>
> Patch attached that:
>
> - rewords the sentence is the Style Manual and changes the
> highlighting; I need to check the next build/download to see if this
> is clearer.
>
> - fixes polygon 'any' method to also return true if exactly ON.
>
> - merge polygons for 'any' so that line on shared boundary is "in"
> rather than "on".
>
> - change the test driver to try all methods relevant to the element,
> checking they return true/false as appropriate. I decided that,
> rather than introducing a new tag saying which methods should match,
> it was clearer to use the 'expected' tag value as a description of
> how the element interacted with the polygons and generate the methods
> that should match from this and the non-matching from a list if all
> methods.
>
> 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] dead end check patch

2020-02-26 Thread Mike Baggaley
Hi Gerd,

please find attached a small patch that improves the dead end check. It
amends the code that looks for a fixme tag on a node to make it look for a
mkgmap:dead-end-check tag instead, and adds a line to the points file
setting mkgmap:dead-end-check=no for nodes with amenity=parking_entrance,
railway=car_shuttle, railway=rolling_highway, fixme=* or FIXME=*.

Please review.

Thanks,
Mike




deadendcheck.patch
Description: Binary data
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev