logo separator

[mkgmap-dev] Creating DEM-like maps using TYP customisation

From Martin Simon grenzdebil at gmail.com on Sun Oct 4 08:24:43 BST 2009

2009/10/3 maning sambale <emmanuel.sambale at gmail.com>:
> nice!  How were you able to close contours along tile borders?
> Is it possible to pre-process the contour tiles before mkgmap?

I'm currently not able to close them - the screenshot is from an area
in the middle of a tile where only closed contours are visible.

I think a pre-processing program would have to find nodes at the tile
border, pick one of them and
1. find the way it belongs to
2. find the way of the next border node in clockwise direction and
find out if it is tagged with a higher value of "ele" than the current
way.
3.a If so, look in clockwise diretion for a node of ways with the same
elevation and add it's way to the current way OR if there is none, add
a point at the next tile corner to the current way.
3.b Else, do the same in counter-clockwise direction.
4. if the other end of the current way is reached, close it and delete
it from the list of ways and nodes to be considered.

At least that's how I (non-programmer, the highest I've reached are
simple, dumb shell  scripts) imagine it could work...

There also is a problem with contours that are *lower* than the
surroundings and *not* cut - they need to be the "inner" member of a
multipolygon relation with the next higher contour as "outer", as else
they will be covered by it.


If you would like to help with this, I can send you my stuff.

-Martin



More information about the mkgmap-dev mailing list