Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #54693
    tartiflette74
    Participant

    Hi,
    I would like to use pathText to write the name along the contour of some areas; this is working well, but it also draws the text horizontally and vertically between tiles (in the screenshot, “parc naturel régional du Massif des Bauges” should only follow the green dash line in the middle of the lake).
    Is there a way to fix this issue?

    <rule e="way" k="protect_class" v="pr_1|pr_2|pr_3|pr_4|pr_5|pr_6|pr_7|pr_97|pr_98|pr_99|~">
    	<line stroke="#3f00A333" stroke-width="0.7" stroke-dasharray="15,5,5,5" stroke-linecap="butt" />
    	<pathText k="name" dy="2" font-style="bold" font-size="8" fill="#990000FF" stroke="#FFFFFF" stroke-width="1" dy="2.5"/>
    </rule>

    Thanks!

    #54695
    Avatar photoJohnPercy
    Participant

    This is a known problem at certain zoom levels and I don’t know of any way round it.

    Voluntary and Velocity themes - https://voluntary.nichesite.org

    #54696
    Avatar photoEmux
    Participant

    If it is the potential issue with tile grid artifacts inside areas at zoom levels 12-13,
    the solution is a different “zoom-interval-conf” in map creation:
    https://github.com/mapsforge/mapsforge/blob/master/docs/Getting-Started-Map-Writer.md#known-pitfalls


    Cruiser and Mapsforge developer – https://github.com/devemux86/cruiser

    #54698
    tartiflette74
    Participant

    Hi Emux,
    The problem is at any zoom level (15 in the screenshot). And it is not about fill, but pathtext which uses the path used to fill, instead of the path used to stroke.
    Thanks!

    #54699
    Avatar photoJohnPercy
    Participant

    Hi Tartiflette
    I’m pretty certain that the “artifact” that Emux refers to is the cause of the problem you are getting. It is not an issue with your theme.It can be resolved by generating the maps differently but if I recall correctly it would result in a significant increase in size for the OAM maps which is why Christian decided not to follow that option.

    Voluntary and Velocity themes - https://voluntary.nichesite.org

    #54705
    Avatar photoChristianK
    Keymaster

    There are some maps with different base zoom-level – Like NL

    These artefakts are no big issue and did’nt justify the change of base zoom levels in all other maps causing massiv impacts on tag-mapping.
    Changing tag-mappings would mean tonns of manhours readjusting zoom-appears and themes to rearchive a stable balance again.

    #54708
    tartiflette74
    Participant

    Of course Christian, I am not suggesting to change how the maps are built. I’m trying to understand why stroke does not create artifacts, while pathtext does.

    I increased the stroke-width, and removed the dy of pathtext so the text is drawn inside the width of stroke. This is the case in the middle of the tile, however in the tile boundary, the stroke is clipped (or partially clipped when its size is large), while the text is not clipped at all. So there is a difference in how stroke and pathtext are processed.

    <rule e="way" k="*" v="*" zoom-min="15">
    	<line stroke="#3f00A333" stroke-width="2.5" dy="0" />
    	<pathText k="name" dy="0" font-style="bold" font-size="8" fill="#990000FF" stroke="#FFFFFF" stroke-width="1" dy="0" repeat-gap="10"/>
    </rule>
    

    I know this issue exists since many years, so sorry if my suggestion is very naive; Emux, would it be possible to have 2 different clipping zones? First clipping, a bit larger than the tile, when computing the geometry of a polygon in a tile of the database, and second clipping when actually drawing the tile (or sub-tile), so drawing the clipped edge will also be clipped.

    Thanks!

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.