Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a random symbology for forests v1.1 #1728

Merged
merged 3 commits into from
Aug 8, 2015
Merged

Use a random symbology for forests v1.1 #1728

merged 3 commits into from
Aug 8, 2015

Conversation

This adds a random symbology for forests, lightens forests, and
unifies natural=wood and landuse=forest rendering.

Using http://www.imagico.de/map/jsdotpattern.php a random pattern
was generated from the SVG

    <path d="m 3.5,0 -3.5,3.5 0,0.5 0.5,0 2.5,-2.5 0,2
    -3,3 0,0.5 0.5,0 2.5,-2.5 0,5.5
    1,0 0,-5.5 2.5,2.5 0.5,0 0,-0.5 -3,-3 0,-2
    2.5,2.5 0.5,0 0,-0.5 z" fill="rgb(58,135,39)"/>

    <path d="m 10.5,0 a 2.5,3 0 0,1 0,6 l 0,-1
    a 1.5,2 0 0,0 0,-4
    a 1.5,2 0 0,0 0,4 l 0,1
    a 2.5,3 0 0,1 0,-6
    z" fill="rgb(58,135,39)"/>

This was then converted with GIMP into a PNG which Mapnik can use.

The forest fill was lightened, but there are now darker symbols on.

This necessitated adjusting the text colour for forests, which was
done in Lch colour space. The frequent symbols also required some
halo adjustments.

There are multiple interpretations in use of landuse=forest vs.
natural=wood. Rather than attempt to sort this out when the tagging
has not settled, the same appearance is used for both.

This commit doesn't use different symbologies for different types
of forests (mixed/coniferous/broad_leaved/palm) (#822), but that
can be considered later.

Fixes #938
Fixes #1724 and #647
Fixes forest part of #937
Closes pnorman#6
Closes #1242
Fixes #1309 and #888

Move grassland colour to grass

There are just too many shades of green, and it couldn't be reliably
differentiated from all the others before

grassland is also merged in with grass. It wasn't distinguishable
before, and there were just too many shades of green.

Code written by Paul Norman, rebased by Mateusz Konieczny.
Please assume that bugs (if any) were caused by mistakes during rebasing.
@ximex
Copy link

ximex commented Aug 6, 2015

i like this pattern more but this one is ok for me too

@imagico
Copy link
Collaborator

imagico commented Aug 7, 2015

The wood/forest background and pattern color are fine but apart from that i have the following critiques/remarks:

  • For the pattern i would prefer a single mixed symbol version as shown on Use a random symbology for forests #1242 - that would help probably especially at z=13. It would also directly offer a path to rendering leaf_type later.
  • Your pattern does not look quite ideal with the symbols lining up on somewhat irregular curves and individual symbols having strongly varying distances to their different neighbours. This is not bad and hardly visible in many cases but it is noticeable with larger areas. If you share your parameters i can see if i can improve it.
  • If you use convert +gamma - (preventing imagemagick to generate png gamma information) for generating your preview pngs you can probably make them show up with correct colors in firefox (why firefox and chrome show this differently is a mystery to me).
  • Your change to park color seems fine but the change to scrub is way too close to the new vineyard/orchard color introduced in meadow/grassland and orchard/vineyard color unification #1655 - this was specifically selected to be well distinguishable from scrub. In fact i don't think there is anything wrong with the current scrub color. Note this also introduces yet another green since golf courses still use the old scrub color.

@matkoniecz
Copy link
Contributor Author

For the pattern i would prefer a single mixed symbol version as shown on #1242 - that would help probably especially at z=13. It would also directly offer a path to rendering leaf_type later.

I agree that this pattern are prettier - and I would like to use them for showing leaf_type (this from PR - without leaf_type, singular mixed symbol - leaf_type=mixed, singular symbol for leaf_type=broadleaved/needleleaved, something else for leaf_type=leafless).

If you share your parameters i can see if i can improve it.

Ops, it seems that I lost parameters. Anyway, it was something like http://www.imagico.de/map/jsdotpattern.php#x,512,jdp54442;g,30,32,32;rx,25,2,32,32;rx,25,2,32,32;s,jdp65794;s,jdp70741;rx,25,2,32,32;

png gamma information

Thanks, I opened matkoniecz/CartoCSSHelper#17 to remember about it (I would prefer to figure way to do it via rmagick)

Your change to park color seems fine but the change to scrub is way too close to the new vineyard/orchard

OK, I will test it. I forgot about this change and that greens need to be retested.

@imagico
Copy link
Collaborator

imagico commented Aug 7, 2015

I agree that this pattern are prettier - and I would like to use them for showing leaf_type (this from PR - without leaf_type, singular mixed symbol - leaf_type=mixed, singular symbol for leaf_type=broadleaved/needleleaved, something else for leaf_type=leafless).

As said i see no reason not to use a mixed symbol pattern universally for now and change to using it only for leaf_type=mixed later. OTOH changing the pattern now to something suboptimal and then inevitably changing it again when leaf_type is rendered seems pointless.

For the pattern try

http://www.imagico.de/map/jsdotpattern.php#x,512,jdp6894;g,30,32,32;s,jdp33742;s,jdp81637;rx,250,2,32,32;s,jdp28824;s,jdp59702;s,jdp91550;s,jdp27774;rx,250,2,64,64;rd,1,0,0,tree%20pair,1,5,5,0,jdp48960;

@kocio-pl
Copy link
Collaborator

kocio-pl commented Aug 7, 2015

In general - another big +1! I also like the way we care for additional extension, like suggesting leaf types etc.

And special big thanks for @pnorman for starting to fix this very complex subject.

@matkoniecz
Copy link
Contributor Author

OTOH changing the pattern now to something suboptimal and then inevitably changing it again when leaf_type is rendered seems pointless.

My idea it to not change it once leaf_type is available and keep using it for forests where leaf_type is missing.

@matkoniecz
Copy link
Contributor Author

For the pattern try

Something went wrong. I am getting file with trees clustered on borders. Can you maybe produce and share generated svg (with trees in Lch(70,30,135) colour)?

index

scrub

The new scrub is a problem. I think that I will keep it unchanged - and it may be synchronized later (reverting scrub change is not making color distances problematic - it increases also distance from forest and it is not getting to close to other greens).

I tried to rebalance it again, without good results.

@imagico
Copy link
Collaborator

imagico commented Aug 7, 2015

For the pattern generator make sure you use the version on imagico.de and you reload all source files - i had changed some code fixing a bug that prevented you from changing the radius after generating the pattern. This is not yet on github.

My idea it to not change it once leaf_type is available and keep using it for forests where leaf_type is missing.

Even if for illustrating leaf_type the same symbols are used this does not appear to be the best solution to me. Using no pattern for no leaf_type seems the most intuitive approach.

@gravitystorm
Copy link
Owner

Using no pattern for no leaf_type seems the most intuitive approach.

No, that's not intuitive. We have far too many "plain greenish fill" polygons to be able to tell which is a forest/wood unless there are symbols.

@matkoniecz
Copy link
Contributor Author

For the pattern generator make sure you use the version on imagico.de and you reload all source files

Thanks, now it is working!

@kocio-pl
Copy link
Collaborator

kocio-pl commented Aug 7, 2015

I think now forest, scrub, orchard are different enough.

@imagico
Copy link
Collaborator

imagico commented Aug 7, 2015

No, that's not intuitive. We have far too many "plain greenish fill" polygons to be able to tell which is a forest/wood unless there are symbols.

I meant intuitive in the way it clearly indicates something is missing in contrast to areas with leaf_type tagged that are rendered with a pattern.

OTOH if a paired symbol pattern is used in some areas and single symbol patterns in others this is less obvious, especially if the same pattern was used indiscriminately for all forest/wood areas before.

@matthijsmelissen
Copy link
Collaborator

I meant intuitive in the way it clearly indicates something is missing in contrast to areas with leaf_type tagged that are rendered with a pattern.

I don't think that leaf_type is so important that we should give users of the map the impression something 'is missing' when forests are tagged without leaf_type.

@imagico
Copy link
Collaborator

imagico commented Aug 7, 2015

It was my understanding that the display of paired symbols is meant to create an even stronger indication of something being wrong than the lack of a pattern. If there is another reason for choosing symbol pairs over mixed individual symbols please explain.

@kocio-pl
Copy link
Collaborator

kocio-pl commented Aug 7, 2015

I've just noticed that leaf_type has 796 665 uses, while natural=wood has 3 044 417 uses and landuse=forest has 2 704 306 uses, so - roughly estimating - only 14% of popular wood tags has leaf_type assigned.

While I think idea of plain green for unknown tree areas is a clever way of encouraging people to be more specific, this would be rather demanding. Some less interesting pattern will be also valuable feedback, while not making rendering of about 86% of tree areas worse (less obvious).

@matkoniecz
Copy link
Contributor Author

It was my understanding that the display of paired symbols is meant to create an even stronger indication of something being wrong than the lack of a pattern.

I think that pair at the same time indicates that it is forest and will subtly encourages to add leaf_type once leaf_type will result in appearance of other patterns.

Lack of pattern for missing leaf_type would also encourage adding missing data but would fail in marking area as forest.

only 14% of popular wood tags has leaf_type assigned.

It is even worse as leaf_type is applied also to natural=tree etc. See http://taginfo.openstreetmap.org/tags/landuse=forest#combinations http://taginfo.openstreetmap.org/tags/natural=wood#combinations - both lower than 7%.

@imagico
Copy link
Collaborator

imagico commented Aug 7, 2015

I think that pair at the same time indicates that it is forest and will subtly encourages to add leaf_type once leaf_type will result in appearance of other patterns.

I have my doubts this is going to be the case, especially for map users who got used to this being the normal forest/wood pattern used everywhere. But you could be right, i can't be sure.

By the way the limited prevalence of leaf_type is partly due to the fact that this tag has not been around for long - there are probably still more maps rendering wood=* than there are rendering leaf_type. There are still >350k uses of wood=* without a leaf_type tag. But of course whatever styling is used for wood/forest without leaf_type will for quite some time surely be the dominating styling - especially of course in areas where forest data has been imported.

Pattern may generated by visiting

http://www.imagico.de/map/jsdotpattern.php#x,512,jdp6894;g,30,32,32;s,jdp33742;s,jdp81637;rx,250,2,32,32;s,jdp28824;s,jdp59702;s,jdp91550;s,jdp27774;rx,250,2,64,64;rd,1,0,0,tree%20pair,1,5,5,0,jdp48960;

and replacing svg patterns in boxes by

<g><path fill="rgb(107,141,94)" d="M 2,0 0,6 0,7 2,7 2,10 3,10 3,7 5,7 5,6 3,0 z M 2.5,1 4,6 1,6 z" /><path fill="rgb(107,141,94)" d="m 7,5 1,0 0,5 -1,0 z" /><path fill="rgb(107,141,94)" d="m 7.5,0 a 2.5,3 0 0 1 0,6 l 0,-1 a 1.5,2 0 0 0 0,-4 1.5,2 0 1 0 0,4 l 0,1 a 2.5,3 0 1 1 0,-6 z" /></g>

<g><path fill="rgb(107,141,94)" d="m 2,5 1,0 0,5 -1,0 z" /><path fill="rgb(107,141,94)" d="m 2.5,0 a 2.5,3 0 0 1 0,6 l 0,-1 a 1.5,2 0 0 0 0,-4 1.5,2 0 1 0 0,4 l 0,1 a 2.5,3 0 1 1 0,-6 z" /><path fill="rgb(107,141,94)" d="M 7,0 5,6 5,7 7,7 7,10 8,10 8,7 10,7 10,6 8,0 z M 7.5,1 9,6 6,6 z" /></g>

to obtain color lch(55, 30, 135)

Generate file in "px aligned" mode.
Orchard/vineyard colors were modified since initial code was written, and new scrub was too close
@dieterdreist
Copy link

Am 07.08.2015 um 17:26 schrieb Christoph Hormann notifications@github.com:

There are still >350k uses of wood=* without a leaf_type tag. But of course whatever styling is used for wood/forest without leaf_type will for quite some time surely be the dominating styling - especially of course in areas where forest data has been imported.

there are also 225.000+ occurences of the (for non-relations deprecated) "type" key with leaf type values.
http://taginfo.openstreetmap.org/keys/type#values

@pnorman
Copy link
Collaborator

pnorman commented Aug 8, 2015

I think that pair at the same time indicates that it is forest and will subtly encourages to add leaf_type once leaf_type will result in appearance of other patterns.

That's why I preferred it. I looked hard for a single symbol that indicated a generic tree without anything about what type of tree, but could not find one.

Quoting myself from before,

The choice of a dual symbol is quite intentional - I need a symbol that does not imply one type of tree or mixed trees, but an unknown type. Unfortunately, I can find no single icon that does that. Suggestions are of course welcome, but both myself and @SK53 looked for a generic tree symbol and couldn't find one.

pnorman added a commit that referenced this pull request Aug 8, 2015
Use a random symbology for forests v1.1
@pnorman pnorman merged commit b982660 into gravitystorm:master Aug 8, 2015
@matkoniecz matkoniecz deleted the new_forest branch August 8, 2015 21:08
@HostedDinner
Copy link

It seems to me, the ordering of layers is not optimal. Now the forest is above lakes, which are not excluded by a multipolygon.
zwischenablage01

@matkoniecz
Copy link
Contributor Author

According to current tagging of this area it is both lake and covered by forest (what may happen in some cases like mangroves - https://en.wikipedia.org/wiki/Mangrove#/media/File:Hunting_For_Worms.JPG ).

In cases where it is not a forested area it should be an inner part of forest multypolygon.

There are also situations where forested area and locality named "Forest Foobar" are not equivalent (lake that is not part of forested area but is part of locality) but there is no established tagging for this situations.

@DaveF63
Copy link

DaveF63 commented Aug 15, 2015

Does this new development include landcover=trees?

I need to see it on the map to verify, but ATM the symbols appear a bit intrusive & the problem noted by @HostedDinner needs to be sorted.

@fkv1
Copy link

fkv1 commented Aug 15, 2015

I don't think that leaf_type is so important that we should give users of the map the impression something 'is missing' when forests are tagged without leaf_type.

I don't think that leaf_type is important enough to render it at all. Those who introduced a random symbology may be rightfully proud of it, but it should not be used for forests/woods. Just render them plain green without any symbols.

@kocio-pl
Copy link
Collaborator

Leaf type is one of the most important property of forest/woodland and it's easy to implement without disturbing anyone, so I'd like to have it in this style.

@fkv1
Copy link

fkv1 commented Aug 15, 2015

it's easy to implement without disturbing anyone

This is not true. I feel disturbed, and I am sure that many others feel the same.

Most official maps (such as http://www.amap.at) and commercial maps (such as http://maps.kompass.at) render forests plain green, and that's one of the reasons why they look considerably better than the OSM carto map.

@kocio-pl
Copy link
Collaborator

You misunderstood me: I just meant implementing leaf types rendering will not make it any more disturbing than it is now (which BTW are less intrusive than what we had before). For me plain green would hide too much, I prefer subtle hint and this is what we have now.

@imagico
Copy link
Collaborator

imagico commented Aug 15, 2015

Fortunately there is no need to decide if this is important from an absolute standpoint, >300k uses quite clearly tells mappers consider it important and since displaying leaf_type is well possible to do in a relatively subtle way it is likely this will happen as soon as it is technically feasible here.

If there are specific issues with the new woodland rendering i would suggest to open a new issue but i would strongly suggest first reading the previous discussion on #1242 as to not repeat arguments from there unnecessarily.

@matkoniecz
Copy link
Contributor Author

I don't think that leaf_type is important enough to render it at all.

See #822 for discussion of this topic.

@SK53
Copy link

SK53 commented Aug 16, 2015

@matkoniecz Historically wood=deciduous and wood=coniferous were rendered in the standard style (which is why this tag persists in the style sheet). Leaf_type is largely a semantically cleaner form of this distinction. In many parts of the world, largely those in temperate and boreo-temperate climatic zones, this distinction is an important aspect of interpreting the landscape from a map. Equally leaf_cycle also plays a part, but we have no history of rendering this distinction because wood=deciduous was treated (erroneously) as a synonym for broad-leaved woodland. As others have stated above, the various tags used to describe this are very heavily used: wood, 400k instances, leaf_type, 300k instances, type, 200k instances (I exclude leaf_type on nodes, and of course these usages are not additive). I take this to mean that there is considerable interest in collecting and displaying this type of information.

Woodland covers about 23% of the world's land area: there are good cartographic reasons why a slightly finer division of types of woodland is worthwhile. More detailed division is clearly something for more specialised projects, but I don't think it is reasonable to dismiss out-of-hand leaf_type and leaf_cycle. This is particularly true now that the hard work of determining suitable ways to add symbols for woodland is nearing fruition.

@fkv1
Copy link

fkv1 commented Aug 17, 2015

Leaf_type is largely a semantically cleaner form of this distinction.

Maybe, but it's botanically unfounded, at least when it comes to whole woods or forests. E.g. in central Europe, you encounter broad leaved plants from sea level up to the alpine zones in all natural plant communities. Even in spruce forests, you'll see one or the other naturally grown young beech. And reversely, you'll hardly find any forest without any Pinacaea, because so many of them are planted or spared. So there's essentially no needle_leaved or broad_leaved forest. You could rather tag the percentage at best, like needleleaved=70%.

I suspect that most wood=* come from imports, and also that most wood=* and leave_type=* on areas are incorrect.

In many parts of the world, largely those in temperate and boreo-temperate climatic zones, this distinction is an important aspect of interpreting the landscape from a map.

This is wrong, because the foliage is only visible from a distance of a few metres.

Woodland covers about 23% of the world's land area: there are good cartographic reasons why a slightly finer division of types of woodland is worthwhile.

How about different shades of green? We could recycle the one we used for natural=forest. The fact that woodland covers big parts of the world suggests NOT to use any symbols. Symbols should only be used for areas that are rare and therefore not obvious to the viewer.

Just compare woodland to water, residential areas etc. Imagine what would happen if all water areas were ornamented with wave symbols, and all residential areas with house symbols, etc. You would not recognize any streets, POIs, nothing. You would be overwhelmed by the ornaments. That's what we experience within woodlands now.

@imagico:
I disagree with you for the above reasons, but speaking of #1242, I think that the rendering you suggested on 2015-01-19 would at least be much better than the one we have right now, first of all because your rendering is less dense, and second because the tree pairs we have right now look like toilet symbols.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.