Re: [mkgmap-dev] routing between different maps

2018-07-17 Thread Gerd Petermann
Hi all,

I've started to look at this. My approach so far:
- add a new flag "on-country-border" in the Coord class
- collect ways with admin_level=2 contained in the input file (alternative 
would be to extract them from the bounds file),
also way members of matching boundary rels
- split those ways into two point segments, so that no segment exists twice
- for each road segment calculate the intersection with any of these segments 
(a spatial index is probably needed), brute
force might be too slow
- if one is found, either add the intersection node or mark one of the existing 
nodes if it is very close
- make sure that these special nodes are preserved like other boundary nodes
- make sure that they are added to the list of external nodes


I am not yet sure what to do with roads that share multiple nodes with country 
borders.

Gerd


Von: mkgmap-dev  im Auftrag von Gerd 
Petermann 
Gesendet: Montag, 25. Juni 2018 07:47
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] routing between different maps

Hi Andrzej,
The idea sounds good to me. I will look at this when I am back.
Ciao Gerd

 Andrzej Popowski schrieb 

Hi Bernhard,

routable roads contains "nodes", which can be junctions or address
points. Only some nodes are marked as "external", mkgmap creates them at
borders of tiles.

My idea is about creating some additional external nodes, that should be
always at the same position, regardless of the way of creating a map.

--
Best regards,
Andrzej
___
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] [Patch] Simplify UnusedElementsRemoverHook

2018-07-17 Thread Gerd Petermann
Hi all,

I've noticed that the hook does a few things which are probably not (or no 
longer) needed:
1) It checks if a way without tags is member of a relation, because the rules 
in relation may add tags to this way.
This was okay when the hook was added to the source, but the hook is now 
executed after 
those rules were executed, so that check is not needed.
2) It doesn't remove nodes outside of the tile bbox when such a node has tags 
keys that are used by the POI generator (--pois-to-areas-placement)
I've changed the code so that it checks for the combination of tag key and 
value, not only for the key.
3) The check if a way is outside of the tile bbox did not work for ways which 
have a bbox that intersects with the tile bbox
while the way itself neither crosses the bbox nor contains it (e.g. a large 
polygon).

If I hear no complains I'll commit this patch on thursday. 

Gerd

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