Betrachte 7 Beiträge - 1 bis 7 (von insgesamt 7)
  • Autor
    Beiträge
  • #20280
    Off-track
    Teilnehmer

    I am attempting to tailor the elevate mapsforge style to make protected areas more clearly visible (in Oruxmaps); ideally with a boundary line around the perimeter. I have tried variations on this code:

    
    <rule cat="borders" e="way" k="leisure|boundary" v="nature_reserve|national_park|protected_area">
    	<rule e="any" k="protect_class" v="1|~" zoom-max="7" zoom-min="7">
    		<area fill="#80C0FFBF" />
    		<line stroke="#8079B900" stroke-width="0.5" stroke-dasharray="5,5" />
    	</rule>
    	<rule e="any" k="protect_class" v="1|~" zoom-min="8" >
    		<area fill="#60C0FFBF" />
    		<line stroke="#6079B900" stroke-width="1.0" stroke-dasharray="5,5" />
    	</rule>
    </rule>
    

    However, this results in unexpected (to me) internal lines that seem to follow tiles of some kind (at all zoom levels below 14); and even more puzzling internal double lines along smaller apparent tiles at zoom levels 12 and 13 only. Both are shown in the attached screen shot.

    Is there a way to avoid these internal / tile lines while keeping the perimeter lines around the protected areas?

    Screenshot_20170924-154813

    #20293
    Avatar-FotoTobias
    Administrator

    As mapsforge maps are shown by generating tiles, all areas are only drawn tile by tile. If an area is larger than a tile, it’s cut at the tile borders. So if you draw a border for an area, it will also be drawn at the tile border. If the border is very thin, it won’t be visible because it’s only drawn at the outer side of the tile. If it’s thicker, it’s drawn also on the inner side, that’s what you’re seeing.

    There are three workarounds:
    – only use thin borders as in Elevate
    – use a solid, non-transparent fill for the area, but then you can’t see what other information is in this area
    – use „force-polygon-line=’true'“ in map creation like it is done for administrative borders in OAM – the border is then only a line, and the area can’t be filled.

    We decided that for protected areas the first workaround despite its limits works best.

    Developer of Elevate mapstyle

    1 Teilnehmer(n) gefällt dieser Beitrag
    #20295
    Off-track
    Teilnehmer

    Thank you Tobias. That explains what is going on, and gives the options clearly, even for a novice like me. Much obliged.

    #20297
    Avatar-FotoEmux
    Teilnehmer

    Actually the tile grid artifacts at zooms 12-13 can be solved with a different (than default) „zoom-interval-conf“ as seen in map-writer documentation.

    Emux

    1 Teilnehmer(n) gefällt dieser Beitrag
    #20303
    Off-track
    Teilnehmer

    Thanks Emux.

    I see the problem has also been discussed here:
    https://groups.google.com/forum/#!topic/mapsforge-dev/1TzknbgeJgo

    If I understand correctly, the solution that you have linked cannot be implemented by a map user (in my case an OpenAndroMap user) through an altered mapsforge rendertheme / style. It would have to be implemented by the map creator. Is that correct?

    #20305
    Avatar-FotoEmux
    Teilnehmer

    That solution requires different map build process, so it’s for map creators.
    Users cannot do much here, except playing with the render themes rules.

    Emux

    1 Teilnehmer(n) gefällt dieser Beitrag
    #20311
    Off-track
    Teilnehmer

    Thanks again Emux. OpenAndroMaps and the available renderthemes are an amazing effort, but the documentation on rendertheme rules is scant, so there is a lot of trial and error for users. From my experiments, I don’t think there is any solution to the original request to be had by a map user through playing with the rendertheme rules.

    The best I could do was to make national parks visually distinct from other conservation zones (as different government rules apply here) and show a perimeter only at zoom levels above 13 (which avoided the prominent internal tile boundaries at lower zoom levels). With transparent fill, there is a distinct tile grid effect due to overlap of tile edges at some zoom levels, but the intrusiveness of this depends on the fill colors and transparency levels chosen. The settings were:

    
    <rule cat="borders" e="way" k="leisure|boundary" v="nature_reserve">
    		<rule e="any" k="protect_class" v="1|~" zoom-min="7" zoom-max="7" >
    			<area fill="#80A2D9CE" />
    		</rule>
    		<rule e="any" k="protect_class" v="1|~" zoom-min="8">
    			<area fill="#60A2D9CE" />
    		</rule>
    		<rule e="any" k="protect_class" v="1|~" zoom-min="8" zoom-max="13" >
    			<area src="file:ele_res/p_nature-reserve.svg" symbol-scaling="size" symbol-height="16" symbol-width="16" fill="#60C0FFBF" />		
    		</rule>
    		<rule e="any" k="protect_class" v="1|~" zoom-min="14" zoom-max="14">
    			<area src="file:ele_res/p_nature-reserve.svg" symbol-scaling="size" symbol-height="32" symbol-width="32" fill="#60C0FFBF" />
    			<line stroke="#117A65" stroke-width="0.3" stroke-dasharray="3,5,1,5" stroke-linecap="butt" />
    		</rule>
    		<rule e="any" k="protect_class" v="1|~" zoom-min="15" zoom-max="15">
    			<area src="file:ele_res/p_nature-reserve.svg" symbol-scaling="size" symbol-height="64" symbol-width="64" fill="#60C0FFBF" />
    			<line stroke="#117A65" stroke-width="0.3" stroke-dasharray="3,5,1,5" stroke-linecap="butt" />
    		</rule>
    		<rule e="any" k="protect_class" v="1|~" zoom-min="16">			
    			<area src="file:ele_res/p_nature-reserve-thin.svg" symbol-scaling="size" symbol-height="128" symbol-width="128" fill="#60C0FFBF" />
    			<line stroke="#117A65" stroke-width="0.3" stroke-dasharray="3,5,1,5" stroke-linecap="butt" />
    		</rule>
    	</rule>	
    	<rule cat="borders" e="way" k="leisure|boundary" v="protected_area">
    		<rule e="any" k="protect_class" v="1|~" zoom-min="7" zoom-max="7" >
    			<area fill="#80F9E79F" />
    		</rule>
    		<rule e="any" k="protect_class" v="1|~" zoom-min="8" >
    			<area fill="#60F9E79F" />
    		</rule>
    		<rule e="any" k="protect_class" v="1|~" zoom-min="8" zoom-max="13" >
    			<area src="file:ele_res/p_nature-reserve.svg" symbol-scaling="size" symbol-height="16" symbol-width="16" fill="#60C0FFBF" />		
    		</rule>
    		<rule e="any" k="protect_class" v="1|~" zoom-min="14" zoom-max="14">
    			<area src="file:ele_res/p_nature-reserve.svg" symbol-scaling="size" symbol-height="32" symbol-width="32" fill="#60C0FFBF" />
    			<line stroke="#B7950B" stroke-width="0.5" stroke-dasharray="4,5,2,5" stroke-linecap="butt" />
    		</rule>
    		<rule e="any" k="protect_class" v="1|~" zoom-min="15" zoom-max="15">
    			<area src="file:ele_res/p_nature-reserve.svg" symbol-scaling="size" symbol-height="64" symbol-width="64" fill="#60C0FFBF" />
    			<line stroke="#B7950B" stroke-width="0.5" stroke-dasharray="4,5,2,5" stroke-linecap="butt" />
    		</rule>
    		<rule e="any" k="protect_class" v="1|~" zoom-min="16">			
    			<area src="file:ele_res/p_nature-reserve-thin.svg" symbol-scaling="size" symbol-height="128" symbol-width="128" fill="#60C0FFBF" />
    			<line stroke="#B7950B" stroke-width="0.5" stroke-dasharray="4,5,2,5" stroke-linecap="butt" />
    		</rule>
    	</rule>	
    	<rule cat="borders" e="way" k="leisure|boundary" v="national_park">
    		<rule e="any" k="protect_class" v="1|~" zoom-min="7" zoom-max="7" >
    			<area fill="#80C0FFBF" />
    		</rule>
    		<rule e="any" k="protect_class" v="1|~" zoom-min="8" >
    			<area fill="#60C0FFBF" />
    		</rule>
    		<rule e="any" k="protect_class" v="1|~" zoom-min="8" zoom-max="13">
    			<area src="file:ele_res/p_nature-reserve.svg" symbol-scaling="size" symbol-height="16" symbol-width="16" fill="#60C0FFBF" />
    		</rule>
    		<rule e="any" k="protect_class" v="1|~" zoom-min="14" zoom-max="14">
    			<area src="file:ele_res/p_nature-reserve.svg" symbol-scaling="size" symbol-height="32" symbol-width="32" fill="#60C0FFBF" />
    			<line stroke="#1E8449" stroke-width="0.7" stroke-dasharray="5,5" stroke-linecap="butt" />
    		</rule>
    		<rule e="any" k="protect_class" v="1|~" zoom-min="15" zoom-max="15">
    			<area src="file:ele_res/p_nature-reserve.svg" symbol-scaling="size" symbol-height="64" symbol-width="64" fill="#60C0FFBF" />
    			<line stroke="#1E8449" stroke-width="0.7" stroke-dasharray="5,5" stroke-linecap="butt" />
    		</rule>
    		<rule e="any" k="protect_class" v="1|~" zoom-min="16">			
    			<area src="file:ele_res/p_nature-reserve-thin.svg" symbol-scaling="size" symbol-height="128" symbol-width="128" fill="#60C0FFBF" />
    			<line stroke="#1E8449" stroke-width="0.7" stroke-dasharray="5,5" stroke-linecap="butt" />
    		</rule>
    	</rule>
    
    

    Screenshot_20170925-195504

Betrachte 7 Beiträge - 1 bis 7 (von insgesamt 7)
  • Sie müssen angemeldet sein, um zu diesem Thema eine Antwort verfassen zu können.