logo separator

[mkgmap-dev] [PATCH v2] Fix so that all polygons are really closed

From WanMil wmgcnfg at web.de on Sun Feb 27 15:53:05 GMT 2011

>> it's the other way round. The patch tests for all unclosed ways that are
>> assigned with a garmin polygon type if both endpoints are outside the
>> bounding box. Only in this case the polygons are closed automatically.
>
> Ok, perhaps take an example, so that I can understand what patch has which effect.
>
> There is an OSM-way with
> Tags:
> tagA=valueA
>
> and Nodes:
> node1
> node2
> node3
>
> (node1 /= node3)
>
> In the polygon style there is a line
>
> tagA=valueA [0x01 continue]
>
> And in the lines style there is a line
>
> tagA=valueA [0x02 continue]
>
> With r1733 this will result in two elements in the garmin map:
> 1. A triangular shape with the type 0x01 and the corners node1, node2 and node3.
> 2. A line with the type 0x02 from node1 via node2 to node3.
>
> With r1733 and restrict_polygon_v1.patch this will result only in one element in
> the garmin map:
> A line with the type 0x02 from node1 via node2 to node3.
>
> What will be the result of r1733 and polygonclose_v2.patch?
>
> What will be the result of r1733 and polygonclose_v2.patch and
> restrict_polygon_v1.patch? (Would this make any sense at all?)
>
> Gruss
> Torsten

I have committed the (slightly changed) polygonclose_v2.patch which is 
now r1865.

Your example will result in
1. line with 0x01
2. a) nothing more if node1 or node2 is within the tiles bounding box
    b) a polygon 0x02 if node1 and node2 is outside or on the tiles 
bounding box.

Both patches do not make sense because if appliying 
restrict_polygon_v1.patch the code of polygonclose_v2.patch will never 
be reached.

WanMil



More information about the mkgmap-dev mailing list