Re: [Talk-GB] Rendering national/regional walking trails

2017-04-23 Thread Andy Townsend



On 23/04/17 11:43, Elizabeth Oldham wrote:
... But I still get only a few labels rendered. My stylesheet for 
rendering ldpnwn is similar to yours. So I'm kind of confused as to 
where the magic is that places multiple labels instead of just a few?


The "text-spacing" settings below 
https://github.com/SomeoneElseOSM/openstreetmap-carto-AJT/blob/master/roads.mss#L3088 
should control that.  When I was testing it I adjusted it up and down 
until the spacing was about right.  I was using TileMill at that point 
to test changes so it worked with Mapnik v2 and am now using it with 
Mapnik v3, so it shouldn't be a Mapnik version problem.  With TileMill 
(or Kosmtik) style changes should apply and be displayed immediately.


Other possibilities would be some sort of tile caching issue, but you've 
no doubt already looked into that?  Maybe just change the name to 
"something else" to make absolutely sure that a new name is rendered, 
but still too infrequently.


Best Regards,

Andy


___
Talk-GB mailing list
Talk-GB@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-gb


Re: [Talk-GB] Rendering national/regional walking trails

2017-04-23 Thread Elizabeth Oldham

On 23/04/17 09:55, Andy Townsend wrote:


I may have got hold of completely the wrong end of the stick here, but
assuming I understand the question properly, I think you're asking how
two names appear for trails at e.g.
https://map.atownsend.org.uk/maps/map/map.html#zoom=14=53.14563=-1.75507


It's not so much that two different names appear, and not overwrite one 
another. But for each relation you get multiple labels along the route. 
I'm getting very few labels on a particular route.


You can see my example here, where I've got the Cumbria Way.

http://openmaps.the-hug.net/?=330478.34705711|530841.03293706|7

I get 3 labels over the whole length. One near Carlisle, one between 
Skiddaw House and Mosedale, and another the other side of Coniston. Now 
this as it happens is using my own table imported from a shapefile.


However, the effect is the same when I do use the osm tables (I haven't 
made it live yet). I tried pulling out snippets of your ldpnwn specif 
code putting them into mine. But I still get only a few labels rendered. 
My stylesheet for rendering ldpnwn is similar to yours. So I'm kind of 
confused as to where the magic is that places multiple labels instead of 
just a few?


Thanks,
Beth

___
Talk-GB mailing list
Talk-GB@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-gb


Re: [Talk-GB] Rendering national/regional walking trails

2017-04-23 Thread Andy Townsend

On 22/04/2017 20:43, Elizabeth Oldham wrote:


Anyway. I noticed on your maps you have multiple ldpnwn labels along 
the routes, like the Cumbria Way, and Coast to Coast. I've been unable 
to get more than one or two labels. I've been searching but it's 
usually the other way around - you have too many labels and need to 
space them out. Is there a trick I'm missing? 


I may have got hold of completely the wrong end of the stick here, but 
assuming I understand the question properly, I think you're asking how 
two names appear for trails at e.g. 
https://map.atownsend.org.uk/maps/map/map.html#zoom=14=53.14563=-1.75507 
?


What's happening is that at 
https://github.com/SomeoneElseOSM/SomeoneElse-style/blob/master/style.lua#L2320 
a "highway=ldpnwn" tag is being added for each relation, and then at 
https://github.com/SomeoneElseOSM/openstreetmap-carto-AJT/blob/master/roads.mss#L1705 
the purple dots are added, and at 
https://github.com/SomeoneElseOSM/openstreetmap-carto-AJT/blob/master/roads.mss#L3088 
the text-spacing defines how far apart the labels go.


Because they are "just highways that happen to overlap each other" as 
far as Mapnik is concerned, it makes sure that the names don't overlap 
on the map.   I wrote a diary entry at 
http://www.openstreetmap.org/user/SomeoneElse/diary/38988 about it.


Best Regards,

Andy


___
Talk-GB mailing list
Talk-GB@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-gb


Re: [Talk-GB] Rendering national/regional walking trails

2017-04-22 Thread Elizabeth Oldham

On 21/04/17 11:47, Andy Townsend wrote:


If you're using osm2pgsql to load a rendering database, then you could
probably use the lua tag transforms and do something with roles for
relations in there.  I've not done anything with relation roles myself,


It was an interesting exercise to play with it yesterday, but I 
concluded it's only useful if you want to play with the tags applied to 
the whole relation. Not just parts of the relation. So I could look at 
the role, and the tags associated with the members, but not actually 
change what is put into the database for only some of the route/relation.


Anyway. I noticed on your maps you have multiple ldpnwn labels along the 
routes, like the Cumbria Way, and Coast to Coast. I've been unable to 
get more than one or two labels. I've been searching but it's usually 
the other way around - you have too many labels and need to space them 
out. Is there a trick I'm missing?


Thanks
Beth


___
Talk-GB mailing list
Talk-GB@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-gb


Re: [Talk-GB] Rendering national/regional walking trails

2017-04-21 Thread Elizabeth Oldham

On 21/04/17 11:47, Andy Townsend wrote:


If you're using osm2pgsql to load a rendering database,


Yes, sorry, I should have said.


probably use the lua tag transforms and do something with roles for
relations in there.  I've not done anything with relation roles myself,
but
https://github.com/SomeoneElseOSM/SomeoneElse-style/blob/master/style.lua
is a lua tag transform I use and
https://github.com/SomeoneElseOSM/SomeoneElse-style/blob/master/style.lua#L2296
is the "relations" part of that, with "roles" as an array argument
passed in.  You could use that to add a "pseudo-tag" like I do with
"network=lwn" to get that to appear as a "highway", then render that as
per e.g.:
https://map.atownsend.org.uk/maps/map/map.html#zoom=14=54.38373=-1.51698


That looks useful. Thanks. I'll see if I can figure out what its doing.
Good map, BTW.

Beth

___
Talk-GB mailing list
Talk-GB@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-gb


Re: [Talk-GB] Rendering national/regional walking trails

2017-04-21 Thread Andy Townsend

On 21/04/2017 11:26, Elizabeth Oldham wrote:
I am trying to render the national and regional walking trails. These 
are done as relations, with tags like network=rwn so easy to pick out. 
When I render them I find there are alternative routes, as an example 
the Coast to Coast Walk splits into 3 at one point. Looking at the 
relation in josm I find they have a "role" of alternative, or main as 
appropriate.


However, I don't seem to be able to get at the "role", and there is 
nothing else which distinguishes main from alternative routes - so I 
can render them differently. 


If you're using osm2pgsql to load a rendering database, then you could 
probably use the lua tag transforms and do something with roles for 
relations in there.  I've not done anything with relation roles myself, 
but 
https://github.com/SomeoneElseOSM/SomeoneElse-style/blob/master/style.lua 
is a lua tag transform I use and 
https://github.com/SomeoneElseOSM/SomeoneElse-style/blob/master/style.lua#L2296 
is the "relations" part of that, with "roles" as an array argument 
passed in.  You could use that to add a "pseudo-tag" like I do with 
"network=lwn" to get that to appear as a "highway", then render that as 
per e.g.: 
https://map.atownsend.org.uk/maps/map/map.html#zoom=14=54.38373=-1.51698 
.


Best Regards,

Andy


___
Talk-GB mailing list
Talk-GB@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-gb


Re: [Talk-GB] Rendering national/regional walking trails

2017-04-21 Thread Paul Berry
Hi Beth,

Roles apply to the members of relation (which are almost always ways), not
the relation itself, if that helps.

In theory a route such as this should be mapped as a parent route_master
relation with all variations of that route as child relations. In practice
this is somewhat rare:
https://wiki.openstreetmap.org/wiki/Relation:route_master

I assume you're looking at https://www.openstreetmap.org/relation/12145 ?

Regards,
*Paul*

On 21 April 2017 at 11:26, Elizabeth Oldham  wrote:

> I am trying to render the national and regional walking trails. These are
> done as relations, with tags like network=rwn so easy to pick out. When I
> render them I find there are alternative routes, as an example the Coast to
> Coast Walk splits into 3 at one point. Looking at the relation in josm I
> find they have a "role" of alternative, or main as appropriate.
>
> However, I don't seem to be able to get at the "role", and there is
> nothing else which distinguishes main from alternative routes - so I can
> render them differently.
>
> Have I missed anything obvious?
>
> Thanks
> Beth
>
> ___
> Talk-GB mailing list
> Talk-GB@openstreetmap.org
> https://lists.openstreetmap.org/listinfo/talk-gb
>
___
Talk-GB mailing list
Talk-GB@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-gb


[Talk-GB] Rendering national/regional walking trails

2017-04-21 Thread Elizabeth Oldham
I am trying to render the national and regional walking trails. These 
are done as relations, with tags like network=rwn so easy to pick out. 
When I render them I find there are alternative routes, as an example 
the Coast to Coast Walk splits into 3 at one point. Looking at the 
relation in josm I find they have a "role" of alternative, or main as 
appropriate.


However, I don't seem to be able to get at the "role", and there is 
nothing else which distinguishes main from alternative routes - so I can 
render them differently.


Have I missed anything obvious?

Thanks
Beth

___
Talk-GB mailing list
Talk-GB@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-gb