line features are converted to a closed way

This way is a line tagged as man_made = breakwater: http://www.openstreetmap.org/browse/way/55131773 I have in my style polygons file a generic assignment for man_made=* [0x13 resolution 24] The compiled map tried to close the line to form a polygon: http://www.flickr.com/photos/esambale/5006580843/ Any idea how to fix this? -- cheers, maning ------------------------------------------------------ "Freedom is still the most radical idea of all" -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ ------------------------------------------------------

maning sambale (emmanuel.sambale@gmail.com) wrote:
This way is a line tagged as man_made = breakwater: http://www.openstreetmap.org/browse/way/55131773
I have in my style polygons file a generic assignment for man_made=* [0x13 resolution 24]
The compiled map tried to close the line to form a polygon: http://www.flickr.com/photos/esambale/5006580843/
Any idea how to fix this? -- cheers, maning
mkgmap assumes that any OSM object that matches a rule in the polygons style file must be a polygon (it has no other way of telling). The only current way to fix this is to edit your polygons rule so that it no longer matches such OSM objects, perhaps man_made=* & (area=yes | area=true) [0x13 resolution 24] In the past I've had a similar problem with man_made=pier, which sometimes in the OSM data is a closed polygon, sometimes not. A rule which matches the closed polygons results in nasty artefacts when the OSM data is not closed, whereas a rule that only matches lines misses all the closed polygons. Personally, I would love it if some logic could be added to mkgmap for it to be able to detect whether something is a closed polygon or not, which would make it much more robust in these instances. -- Charlie

On Mon, Sep 20, 2010 at 1:52 PM, <charlie@cferrero.net> wrote:
Personally, I would love it if some logic could be added to mkgmap for it to be able to detect whether something is a closed polygon or not, which would make it much more robust in these instances. Right, I think coastline does this already, because, log errors reports non-closed coastlines. Or, simply disregard non-closed ways that are included in the polygons style files.
-- cheers, maning ------------------------------------------------------ "Freedom is still the most radical idea of all" -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ ------------------------------------------------------

The coastline log errors come from the special coastline handling which has nothing in common with the described problem. Attached patch performs only the line styles on unclosed ways (the patch is untested!!). Please consider the following: 1. Line rules must be performed on polygons (==closed ways). Otherwise all roundabouts and other circular streets will disappear. 2. Due to the tile splitter lots of polygons on the tile border might not be completely contained in the tile. I'm not sure if these ways are closed or not. WanMil
On Mon, Sep 20, 2010 at 1:52 PM,<charlie@cferrero.net> wrote:
Personally, I would love it if some logic could be added to mkgmap for it to be able to detect whether something is a closed polygon or not, which would make it much more robust in these instances. Right, I think coastline does this already, because, log errors reports non-closed coastlines. Or, simply disregard non-closed ways that are included in the polygons style files.

WanMil schrieb am 20.09.2010 20:44:
Attached patch performs only the line styles on unclosed ways (the patch is untested!!).
I tried your patch and I didn't notice any unwanted side effects. Since this is quite a change from the previous behaviour, perhaps it would be a good idea to control this via a command line parameter. Another idea would be, to control this seperately for each line in the style file. But from my point of view this is not neccessary, since all non closed area polygons are a mapping error and should be corrected in the data base. Gruss Torsten

charlie@cferrero.net schrieb am 20.09.2010 07:52:
Personally, I would love it if some logic could be added to mkgmap for it to be able to detect whether something is a closed polygon or not, which would make it much more robust in these instances.
I would also like to see such a feature, perhaps implemented via a command line switch. The problem occurs for me, when I want to display access restrictions on my map. access=* can be placed on any area element (e.g. amenity=parking) or it can be placed on any line element e.g. highway=* Right now there is no way to tell mkgmap, that the polygon rules shall not be applied to the line elements. If the polygon rules could be limited to closed polygons only, than this problem would not be solved completely but to a very large degree. (There can still be line elements forming a closed loop.) Gruss Torsten
participants (4)
-
charlie@cferrero.net
-
maning sambale
-
Torsten Leistikow
-
WanMil