Re: [mkgmap-dev] Admin relations

2018-07-14 Thread Gerd Petermann
Hi all,

the problem with e.g. Way 41230883 in Hennings real input data is this:
The LocationHook is used for all ways in the input file and the ways are not 
yet trimmed to the bounding box.
Now, with Hennings input file, the n/2-th point lies outside of the bbox, this 
node is ignored and mkgmap tries the first node (0) as next alternative. This 
node lies on the boundary between CHN and MNG, the returned result is more or 
less unpredictable.

I am not yet sure how to handle this. Working on it.

Gerd


Gerd



Von: mkgmap-dev  im Auftrag von Henning 
Scholland 
Gesendet: Freitag, 13. Juli 2018 16:21
An: mkgmap-dev@lists.mkgmap.org.uk
Betreff: Re: [mkgmap-dev] Admin relations

Hi Gerd,
thanks for the fix, for the issue on Chinese side of the border it works
fine.

Henning

On 13.07.2018 13:19, Gerd Petermann wrote:
> Hi,
>
> I've implemented the small change for two node ways in r4195. As expected it 
> fixes the problem for the way in China.
> In my previous post I forgot to add "in Mongolia" after "the two admin_level 
> 4 ways.".
>
> Gerd
>
> 
> Von: mkgmap-dev  im Auftrag von Gerd 
> Petermann 
> Gesendet: Freitag, 13. Juli 2018 06:50
> An: Henning Scholland; Development list for mkgmap
> Betreff: Re: [mkgmap-dev] Admin relations
>
> Hi Henning,
>
> cannot find a problem in source.osm. I've tried with an old bounds.zip and 
> with the current one from 
> http://osm2.pleiades.uni-wuppertal.de/bounds/latest/bounds.zip
> With both the LocationHook sets mkgmap:admin_level2=MNG for the two 
> admin_level 4 ways.
>
> Gerd
>
> 
> Von: mkgmap-dev  im Auftrag von Gerd 
> Petermann 
> Gesendet: Donnerstag, 12. Juli 2018 19:16
> An: Henning Scholland; Development list for mkgmap
> Betreff: Re: [mkgmap-dev] Admin relations
>
> Hi Henning, for a way with 2 nodes n/2 gives 1, and the nodes are numbered 
> starting with 0, so the n/2 node is the last, not the first. The last is in 
> the north.
>
> Maybe it would be better to calculate the position of the middle for a way 
> with just 2 nodes, at least this would solve this problem and it should not 
> produce new problems.
>
> I'll check your sample file tomorrow.
>
> Gerd
>
> 
> Von: mkgmap-dev  im Auftrag von 
> Henning Scholland 
> Gesendet: Donnerstag, 12. Juli 2018 17:30
> An: mkgmap-dev@lists.mkgmap.org.uk
> Betreff: Re: [mkgmap-dev] Admin relations
>
> Hi Gerd,
>
> while checking the process with echotags function, I can confirm the
> mkgmap:country tag is set wrong, but set.
>
> Henning
> ___
> 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
> ___
> 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] Admin relations

2018-07-13 Thread Henning Scholland

Hi Gerd,
thanks for the fix, for the issue on Chinese side of the border it works 
fine.


Henning

On 13.07.2018 13:19, Gerd Petermann wrote:

Hi,

I've implemented the small change for two node ways in r4195. As expected it 
fixes the problem for the way in China.
In my previous post I forgot to add "in Mongolia" after "the two admin_level 4 
ways.".

Gerd


Von: mkgmap-dev  im Auftrag von Gerd 
Petermann 
Gesendet: Freitag, 13. Juli 2018 06:50
An: Henning Scholland; Development list for mkgmap
Betreff: Re: [mkgmap-dev] Admin relations

Hi Henning,

cannot find a problem in source.osm. I've tried with an old bounds.zip and with 
the current one from 
http://osm2.pleiades.uni-wuppertal.de/bounds/latest/bounds.zip
With both the LocationHook sets mkgmap:admin_level2=MNG for the two admin_level 
4 ways.

Gerd


Von: mkgmap-dev  im Auftrag von Gerd 
Petermann 
Gesendet: Donnerstag, 12. Juli 2018 19:16
An: Henning Scholland; Development list for mkgmap
Betreff: Re: [mkgmap-dev] Admin relations

Hi Henning, for a way with 2 nodes n/2 gives 1, and the nodes are numbered 
starting with 0, so the n/2 node is the last, not the first. The last is in the 
north.

Maybe it would be better to calculate the position of the middle for a way with 
just 2 nodes, at least this would solve this problem and it should not produce 
new problems.

I'll check your sample file tomorrow.

Gerd


Von: mkgmap-dev  im Auftrag von Henning 
Scholland 
Gesendet: Donnerstag, 12. Juli 2018 17:30
An: mkgmap-dev@lists.mkgmap.org.uk
Betreff: Re: [mkgmap-dev] Admin relations

Hi Gerd,

while checking the process with echotags function, I can confirm the
mkgmap:country tag is set wrong, but set.

Henning
___
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
___
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] Admin relations

2018-07-12 Thread Gerd Petermann
Hi Henning,

cannot find a problem in source.osm. I've tried with an old bounds.zip and with 
the current one from 
http://osm2.pleiades.uni-wuppertal.de/bounds/latest/bounds.zip
With both the LocationHook sets mkgmap:admin_level2=MNG for the two admin_level 
4 ways.

Gerd


Von: mkgmap-dev  im Auftrag von Gerd 
Petermann 
Gesendet: Donnerstag, 12. Juli 2018 19:16
An: Henning Scholland; Development list for mkgmap
Betreff: Re: [mkgmap-dev] Admin relations

Hi Henning, for a way with 2 nodes n/2 gives 1, and the nodes are numbered 
starting with 0, so the n/2 node is the last, not the first. The last is in the 
north.

Maybe it would be better to calculate the position of the middle for a way with 
just 2 nodes, at least this would solve this problem and it should not produce 
new problems.

I'll check your sample file tomorrow.

Gerd


Von: mkgmap-dev  im Auftrag von Henning 
Scholland 
Gesendet: Donnerstag, 12. Juli 2018 17:30
An: mkgmap-dev@lists.mkgmap.org.uk
Betreff: Re: [mkgmap-dev] Admin relations

Hi Gerd,

while checking the process with echotags function, I can confirm the
mkgmap:country tag is set wrong, but set.

Henning
___
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] Admin relations

2018-07-12 Thread Gerd Petermann
Hi Henning, for a way with 2 nodes n/2 gives 1, and the nodes are numbered 
starting with 0, so the n/2 node is the last, not the first. The last is in the 
north.

Maybe it would be better to calculate the position of the middle for a way with 
just 2 nodes, at least this would solve this problem and it should not produce 
new problems.

I'll check your sample file tomorrow.

Gerd


Von: mkgmap-dev  im Auftrag von Henning 
Scholland 
Gesendet: Donnerstag, 12. Juli 2018 17:30
An: mkgmap-dev@lists.mkgmap.org.uk
Betreff: Re: [mkgmap-dev] Admin relations

Hi Gerd,

while checking the process with echotags function, I can confirm the
mkgmap:country tag is set wrong, but set.

Henning
___
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] Admin relations

2018-07-12 Thread Henning Scholland

Hi Gerd,

while checking the process with echotags function, I can confirm the 
mkgmap:country tag is set wrong, but set.


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


Re: [mkgmap-dev] Admin relations

2018-07-12 Thread Henning Scholland

Hi Gerd,

I felt a little strange, as it is the only tile causing this problem. I 
took a look into the result of splitter, added two nodes with 
test=country and they were set to the matching country code. As the 
issues were matching exactly with the tile boundaries, I was thinking 
maybe it's just swapped for this tile.


You are right, the ways are quite long in that area. But for the east 
level4-border in Mongolia, which is shown, there are plenty of nodes in 
Mongolia. Even after splitting the way at the tile edge and even on the 
west level4-border in Mongolia, there are 4 nodes after splitting the 
way at tile edge. I put relevant data in attachment. Those ways issue 
doesn't match to your explanation.
For the Chinese level4-border it just contains a 2-node way, with or 
without splitting it on the tile edge. So there is no n/2-node for my 
understanding of your explanation. The direction of the way is from 
south-to-north. So the first node should be definitely in China, the 
last one is on the borderline.


Either I got your explanation wrong or there is some issue on that tile. 
Maybe because of it flat and long shape? If you need I can send you the 
result of splitter for that tile by private mail.


In general it could be a idea to calculate an artificial middle node for 
2-node ways to check first, as there is no n/2 one. But as pointed out 
above, I don't think this is the issue in my case.


Henning

(Hope you enjoyed the cycling trip)

On 12.07.2018 13:19, Gerd Petermann wrote:

Hi Henning,

I think you might hit a problem here because of the way how the LocationHook 
uses the data in the bounds file.
When used for a way with n nodes it first tries to get information for node 
n/2. If that fails it tries the first, then the last, finally all other nodes.
The lines in your screenshot all look straight, so the corresponding OSM ways 
might have only 2 nodes. In that case the only tested node
may be the one on the border between China and Mongolia. I assume that the 
actual mkgmap:admin_level2 value for those nodes are more or less
random or that the value is empty.

If the value for mkgmap:admin_level2 is empty mkgmap should probably try 
another node. This doesn't happen.
I see no easy way to handle this when the value is set.

Gerd


Von: mkgmap-dev  im Auftrag von Henning 
Scholland 
Gesendet: Donnerstag, 12. Juli 2018 01:58:16
An: mkgmap-dev@lists.mkgmap.org.uk
Betreff: Re: [mkgmap-dev] Admin relations

Hi Andrzej,
yes they are both in and in general it's working. Just on the borders I
get these issues. I guess it's because of precision, how mkgmap
calculates the area of China. The strange thing is, that the missing red
part on Chinese border (Inner Mongolia/Gansu) Is roughly from the center
of the last way to the end. For the blue marked ways it's shorter than
half of it's length. So can't be the reason, a way or so is missing or
is ignored completly. It's seems more, that there is kind of buffer, as
both has the same length missing. And the both blue ways seems to end at
same latitude. Sorry for forgetting the scale on the picture, but it's
about 50km length missing/too much.

If it's like this I wonder how mkgmap:country can work for address
search in more dense populated areas.

Henning
___
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] Admin relations

2018-07-11 Thread Gerd Petermann
Hi Henning,

I think you might hit a problem here because of the way how the LocationHook 
uses the data in the bounds file.
When used for a way with n nodes it first tries to get information for node 
n/2. If that fails it tries the first, then the last, finally all other nodes.
The lines in your screenshot all look straight, so the corresponding OSM ways 
might have only 2 nodes. In that case the only tested node
may be the one on the border between China and Mongolia. I assume that the 
actual mkgmap:admin_level2 value for those nodes are more or less
random or that the value is empty.

If the value for mkgmap:admin_level2 is empty mkgmap should probably try 
another node. This doesn't happen. 
I see no easy way to handle this when the value is set. 

Gerd


Von: mkgmap-dev  im Auftrag von Henning 
Scholland 
Gesendet: Donnerstag, 12. Juli 2018 01:58:16
An: mkgmap-dev@lists.mkgmap.org.uk
Betreff: Re: [mkgmap-dev] Admin relations

Hi Andrzej,
yes they are both in and in general it's working. Just on the borders I
get these issues. I guess it's because of precision, how mkgmap
calculates the area of China. The strange thing is, that the missing red
part on Chinese border (Inner Mongolia/Gansu) Is roughly from the center
of the last way to the end. For the blue marked ways it's shorter than
half of it's length. So can't be the reason, a way or so is missing or
is ignored completly. It's seems more, that there is kind of buffer, as
both has the same length missing. And the both blue ways seems to end at
same latitude. Sorry for forgetting the scale on the picture, but it's
about 50km length missing/too much.

If it's like this I wonder how mkgmap:country can work for address
search in more dense populated areas.

Henning
___
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] Admin relations

2018-07-11 Thread Henning Scholland
Sorry, I just realised after opening tile borders in jOSM, the split is 
just at tile border.


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


Re: [mkgmap-dev] Admin relations

2018-07-11 Thread Henning Scholland

Hi Andrzej,
yes they are both in and in general it's working. Just on the borders I 
get these issues. I guess it's because of precision, how mkgmap 
calculates the area of China. The strange thing is, that the missing red 
part on Chinese border (Inner Mongolia/Gansu) Is roughly from the center 
of the last way to the end. For the blue marked ways it's shorter than 
half of it's length. So can't be the reason, a way or so is missing or 
is ignored completly. It's seems more, that there is kind of buffer, as 
both has the same length missing. And the both blue ways seems to end at 
same latitude. Sorry for forgetting the scale on the picture, but it's 
about 50km length missing/too much.


If it's like this I wonder how mkgmap:country can work for address 
search in more dense populated areas.


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


Re: [mkgmap-dev] Admin relations

2018-07-11 Thread Andrzej Popowski

Hi Henning,

does your style include 'inc/address' before rules for boundaries? 
Default style doesn't make it easy to use mkgmap:country, which is 
actually generated after all rules in finalize stage.


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