logo separator

[mkgmap-dev] Problem with splitter

From Richard Hansen rhansen at bbn.com on Sat Mar 17 17:43:17 GMT 2012

On 2012-03-15 03:51, GerdP wrote:
> Hi Wolfgang,
>
> I've described splitters algorithm as it is now here:
> http://gis.19327.n5.nabble.com/Problem-with-splitter-tp5555886p5561551.html
>
> I am now working on a first approach that looks like this:
> pass 1: calculate tile areas
> pass 2:
> a) for each coord, way: find out all tiles that are "touched", save the info
> in a map

What is the definition of "touched"?

If a tile's extended bounding box is completely enclosed by an area, 
does that way "touch" the tile?  What if the way was a closed polyline 
instead of an area?

ASCII art illustration, where 'o' is a node, the outer box is a way 
(either area or closed polyline), and the inner box is a tile's extended 
bounding box:

     o-----------o
     |  _______  |
     | |       | |
     | |       | |
     | |_______| |
     o-----------o

> b) for each relation, find out all tiles that are "touched", and add this
> information to the way map
> (so that each way belonging to a relation will be written to all tiles that
> is touched by the relation)

Same question:  What does it mean for a relation to touch a tile?

> pass 3: for each node of each way: add the info from the way map to the
> coords map
> (so that each coord belonging to a way will be written to all tiles that is
> touched by the way)
> pass 4: for each node, way, and relation: write to the output files

Suppose I feed all of North America to splitter.  Wouldn't this 
algorithm write all of the nodes, ways, and relations that compose the 
United States administrative boundary to every tile in the US?

-Richard



More information about the mkgmap-dev mailing list