Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-12-27 Thread Aun Johnsen
On Tue, Dec 22, 2009 at 4:18 PM, Martin Koppenhoefer  wrote:

> 2009/12/22 Charlie Ferrero 
>
> Ditto showing custom station symbols (e.g. the London Underground
>> symbol, or a non-copyright version of same).  It's much harder to spot a
>> tube stop on the OSM london map than it is on the Google map for this
>> reason.
>>
>
> this goes even further: colours for highways, busstops, ...
>
> But how do we want to tag those? Shall there be a tag specifying the logo
> on every feature? Should it be done by translating the operator-tag? Would
> it be possible to maintain a parallel database with these informations and
> corelate it by polygons /  locations / ids?
>
network tag in highway relations for highway shields, operator tags for
banks, petrol stations, bus stops, etc. I think all the necessary
information already is available with network and operator. The next step
will be to make a table of networks and operators and their respective
shields and icons. When that is in place, make the actual rendering rules to
Mapnik/Osmarender/Kosmos/
___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-12-27 Thread John Smith
2009/12/27 Lennard :
> Does it need solving? It's been said that the current uniform worldwide
> appearance has its advantages as well.

Like most other issues, some say yes and some say no, there is no
consensus on this or many other similar issues nor would I expect
there ever to be, that doesn't mean those that would like to see a
problem solved should be actively discouraged just because some have a
subjective preference on a topic. If there is a technical issue that
is entirely a different matter and this thread is for the purpose of
discussing the technical points on solving it which you just snipped.

> I suggest you set up your own render farm, and start experimenting and
> working out all the kinks and bugs, and keep it performant at the same
> time. Only when you've achieved that, can we think about migrating this
> to the main mapnik map. Or not, depending on then current views about
> this subject.

I never made any mention of implementing something untested on the
main OSM servers, and I already do have mapnik etc setup and working
at present, however this thread is for discussing how to do it, not if
or when it should be done on OSM equipement.

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-12-27 Thread Lennard
John Smith wrote:

> Ok, another go at solving this, I've been talking to h4ck3rm1k3 about
> this problem some what and we think we might have a workable solution.

Does it need solving? It's been said that the current uniform worldwide 
appearance has its advantages as well.

[skip technical ideas]

> Then all we need is some logic to apply the shield "name" from the
> lookup table to the database after any changesets have been applied to
> the database and bobs your uncle we should now have a scalable
> solution. I hope :)

I suggest you set up your own render farm, and start experimenting and 
working out all the kinks and bugs, and keep it performant at the same 
time. Only when you've achieved that, can we think about migrating this 
to the main mapnik map. Or not, depending on then current views about 
this subject.

-- 
Lennard

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-12-27 Thread John Smith
Ok, another go at solving this, I've been talking to h4ck3rm1k3 about
this problem some what and we think we might have a workable solution.

Firstly we need to build a suitable lookup table, currently far from
complete it will need to have some default method for things like
county highway shields in the US regardless if the state and county
specifically hasn't been added to the lookup table.

I've used LGA instead of county for the lookup table, LGA = Local
Government Area, which is counties or shires or councils or , what
ever comes below states, I couldn't think of a better term to use than
state, I realise these are called provinces etc.

The other problem is ways crossing LGA, state or country borders, I'm
not sure how mapnik etc handles this, but the ways may need to be
split to prevent shields from leaking across those borders.

I have a basic lookup table on the wiki, I think it should be possible
for pre-processing software to download this information and use it to
apply shields.

The ways table in the mapnik DB will need an extra custom column, eg
shield and from there it's just a matter of finding out what country
polygon encloses the way and working out if the network=* needs more
precise information like state and LGA polygon the way is contained
in. The initial country lookup is to prevent reuse of network=* tags
of the same name for different things in different countries.

Then all we need is some logic to apply the shield "name" from the
lookup table to the database after any changesets have been applied to
the database and bobs your uncle we should now have a scalable
solution. I hope :)

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-12-22 Thread John Smith
2009/12/23 Martin Koppenhoefer :
> yes (btw: "similar" is probably not what would be permitted, I guess it must
> be "identical" to get permission), but I'm pretty sure as soon as we
> implement them, we'll get thousands of those (fuel stations, fast-food,
> supermarkets, drugstores) and will have to discuss about brands / neutrality
> / advertising. If we agree that it is desirable to display logos on our maps
> then we should collect and store the permissions for the use of those (will
> all generally be protected as trademarks) e.g. in the wiki.

At this stage that's a pipe dream, we can't even render custom highway
shields, once we have that licked we can think about other things like
this.

> While I'm not sure if I support the implementation of all kind of custom
> logos (e.g. Mc Donald's), I do support it for public transport.  Have a look
> here:
> http://mic-ro.com/metro/metrologos-static.html
> the london underground is just the top of the iceberg ;-)

Maybe someone needs to start a wish list on the wiki of custom signs
they'd like to see rendered, it seems this could be extensive.

Maybe we just need to do a lookup in post-processing and attach the
shield icon at that point to the database, although I'm not sure how
the best way to do this would be since you might need polygons already
in the database before you can assign highway shields for a country
etc.

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-12-22 Thread Martin Koppenhoefer
2009/12/22 John Smith 

>
> As for operator logos, we recently imported a bunch of BP amenity=fuel
> locations and I was only pondering how it would be nice to make them
> render an icon similar to their logo.
>

yes (btw: "similar" is probably not what would be permitted, I guess it must
be "identical" to get permission), but I'm pretty sure as soon as we
implement them, we'll get thousands of those (fuel stations, fast-food,
supermarkets, drugstores) and will have to discuss about brands / neutrality
/ advertising. If we agree that it is desirable to display logos on our maps
then we should collect and store the permissions for the use of those (will
all generally be protected as trademarks) e.g. in the wiki.

While I'm not sure if I support the implementation of all kind of custom
logos (e.g. Mc Donald's), I do support it for public transport.  Have a look
here:
http://mic-ro.com/metro/metrologos-static.html
the london underground is just the top of the iceberg ;-)

cheers,
Martin
___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-12-22 Thread John Smith
2009/12/23 Martin Koppenhoefer :
> 2009/12/22 Charlie Ferrero 
>>
>> Ditto showing custom station symbols (e.g. the London Underground
>> symbol, or a non-copyright version of same).  It's much harder to spot a
>> tube stop on the OSM london map than it is on the Google map for this
>> reason.
>
> this goes even further: colours for highways, busstops, ...
>
> But how do we want to tag those? Shall there be a tag specifying the logo on
> every feature? Should it be done by translating the operator-tag? Would it
> be possible to maintain a parallel database with these informations and
> corelate it by polygons /  locations / ids?

Previously someone suggested that some of the work to calculate
information should be dealt with in pre-processing, which is probably
a sensible idea to reduce the time to render tiles that aren't already
cached, so a lookup table might not be such a bad idea.

As for operator logos, we recently imported a bunch of BP amenity=fuel
locations and I was only pondering how it would be nice to make them
render an icon similar to their logo.

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-12-22 Thread Martin Koppenhoefer
2009/12/22 Charlie Ferrero 

> Ditto showing custom station symbols (e.g. the London Underground
> symbol, or a non-copyright version of same).  It's much harder to spot a
> tube stop on the OSM london map than it is on the Google map for this
> reason.
>

this goes even further: colours for highways, busstops, ...

But how do we want to tag those? Shall there be a tag specifying the logo on
every feature? Should it be done by translating the operator-tag? Would it
be possible to maintain a parallel database with these informations and
corelate it by polygons /  locations / ids?

Cheers,
Martin
___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-12-22 Thread Charlie Ferrero


John Smith wrote:
> 2009/9/21 Richard Weait :
>>
>>  [highway] = 'motorway' and [length] = 8
>>  100
>>  100
>>  > size="10" fill="#fff" placement="line" file=
>> "%SYMBOLS_DIR%/mot_shield7.png" type="png" width="59" height="17"
>> min_distance="30" spacing="750"/>
>>
> 
> This thread died some time ago, has any progress been made with mapnik
> or anything else that would easily allow at least custom shields for
> the main routes of a country?
> 
> There is a lot of people that would love to see something more
> familiar and less bland show up on map tiles. The majority of
> non-OSMers expect maps to look a certain way and even Google is
> rendering custom highway shields differently for different countries.
> 
> If we want to win the hearts and minds of non-mappers we need to fill
> certain expectations of what a regular map should look like.
> 
Ditto showing custom station symbols (e.g. the London Underground 
symbol, or a non-copyright version of same).  It's much harder to spot a 
tube stop on the OSM london map than it is on the Google map for this 
reason.

Charlie

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-12-22 Thread John Smith
2009/9/21 Richard Weait :
>    
>      [highway] = 'motorway' and [length] = 8
>      100
>      100
>       size="10" fill="#fff" placement="line" file=
> "%SYMBOLS_DIR%/mot_shield7.png" type="png" width="59" height="17"
> min_distance="30" spacing="750"/>
>    

This thread died some time ago, has any progress been made with mapnik
or anything else that would easily allow at least custom shields for
the main routes of a country?

There is a lot of people that would love to see something more
familiar and less bland show up on map tiles. The majority of
non-OSMers expect maps to look a certain way and even Google is
rendering custom highway shields differently for different countries.

If we want to win the hearts and minds of non-mappers we need to fill
certain expectations of what a regular map should look like.

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-21 Thread John Smith
2009/9/22 Alex Mauer :
> On 09/21/2009 10:31 AM, John Smith wrote:
>> If we want to encourage others to be involved those others expect maps
>> to look a certain way, and if we can do it why shouldn't we to
>> encourage more people to participate, a world wide bland map is a turn
>> off.
>
> On the contrary, I think a unified look to the whole world is wonderful.
>
> It would be nice to have appropriate shields rendered though.

I was talking about shields, I have no problem with the road
colouring, although it would be nice to have unpaved roads dotted
somehow, there is a lot of them here and it's useful in figuring out
which roads to avoid.

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-21 Thread Alex S.
Matt Williams wrote:
> If an American wants to create an American-style map with the
> whole world coloured their way, then that's fine.

Obviously, you aren't American.  There is no central authority here that 
decides how maps are drawn.  Every map publisher has their own way of 
doing it.  American maps have only one thing in common: they include a 
legend.


___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-21 Thread Stephen Hope
2009/9/22 Richard Weait :
> Now everything I know about Australian highways I learned from Mel
> Gibson in _The Road Warrior_ so I have much to learn.  What is the
> shield landscape like in Australia?
>

Queensland is in the (slow) process of changing to alphanumeric
designations, starting with the main highways. It also has a lot of
local (state) routes.  The main problem with them, is that many of the
numbers are used twice.  They only use two digit numbers, and they
have more than a hundred local routes, as the state is enormous -
bigger then Alaska, or about 3/4 of the area of Western Europe.

Pretty much every secondary (or better) road in the SE Metropolitan
area is a State route, and a lot of these numbers are reused on rural
roads in other parts of the state. It's generally not too much of a
problem, but something to be aware of. These numbers would be B roads
in the new alphanumeric system (I think), but I've never seen a Bnn
sign in Qld, the signs are just a blue shield with the number. They've
pretty much changed all the A and M roads to the new designations, but
I'm not sure if they're going to keep working down the list to the
lower roads or not.

Stephen

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-21 Thread Elizabeth Dodd
On Tue, 22 Sep 2009, Richard Weait wrote:
> Now everything I know about Australian highways I learned from Mel
> Gibson in _The Road Warrior_ so I have much to learn.  What is the
> shield landscape like in Australia?
http://www.ozroads.com.au/NationalSystem/natsystem.htm
but we have a partly changed system in one State
http://www.ozroads.com.au/NSW/Special/MAB/evidence.htm

-- 
BOFH excuse #395:

Redundant ACLs. 


___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-21 Thread Apollinaris Schoell
> I don't recall seeing I and US on signs in the US, although it might
> have been the case where I've been.
>
>
Verified on the way to work today. Even this is not consistent. Some shields
have some don't. At least in california.
the large overhead signs have only the number but the signs along the
highway have it. maybe these are older designs which haven't been replaced.

But it doesn't really matter for a map rendering. Even google maps uses the
same shield across US. State HW shields are completely different than on the
signs. they don't render county HW shields at all. Yahoo renders the county
ref numbers but no special shields. Garmin maps are same as google maps.

If someone can come up with a workable solution it's fine. I won't spend
much time on it it's not really worth all the effort to make it work on a
global scale. Doing it for country maps is a different story and can be done
on local servers.




>
>
> ___
> talk mailing list
> talk@openstreetmap.org
> http://lists.openstreetmap.org/listinfo/talk
>
___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-21 Thread Alex Mauer
On 09/21/2009 10:31 AM, John Smith wrote:
> If we want to encourage others to be involved those others expect maps
> to look a certain way, and if we can do it why shouldn't we to
> encourage more people to participate, a world wide bland map is a turn
> off.

On the contrary, I think a unified look to the whole world is wonderful.

It would be nice to have appropriate shields rendered though.

-Alex Mauer “hawke”



signature.asc
Description: OpenPGP digital signature
___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-21 Thread Russ Nelson
Andy Allan writes:
 > I'll leave for cartographers to decide; personally I think it looks
 > naff but that doesn't stop other people from doing so.

Sorry, I don't speak English.  Is "naff" good or bad?  I hope good.
Anyway, US maps are often rendered with the shape of the sign, and I'd
like to see them on OSM.

-- 
--my blog is athttp://blog.russnelson.com
Crynwr supports open source software
521 Pleasant Valley Rd. | +1 315-323-1241
Potsdam, NY 13676-3213  | Sheepdog   

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-21 Thread John Smith
2009/9/22 Matt Williams :
> Indeed. I remember this discussion coming up a year or two ago when
> talking about the colouring of roads in the default Mapnik renderer.
> Some people wanted each country's roads to be rendered in the style
> (colouring etc.) that the locals in that country typically display it
> (cueing discussions about how to transition at country boundaries).
> However, it was argued (and mostly agreed upon) that we don't want
> that. If an American wants to create an American-style map with the
> whole world coloured their way, then that's fine. Likewise for a
> German or British coloured map. Each map rendering should be uniform
> across the world and we should avoid having geographically localised
> differentiated rendering schemes within one map. This is of course
> just general advice and means nothing about what you do with your own
> home-grown renderings. The default Mapnik map, however should remain
> homogeneous.

If we want to encourage others to be involved those others expect maps
to look a certain way, and if we can do it why shouldn't we to
encourage more people to participate, a world wide bland map is a turn
off.

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-21 Thread Matt Williams
2009/9/21 Andy Allan :
> On Mon, Sep 21, 2009 at 3:33 PM, Richard Weait  wrote:
>> I've been operating under the presumption that incremental
>> improvements of shield branding across North America would be a good
>> thing.  So if initially all county roads show a default county shield
>> until the custom, local county shield is included, I think that is an
>> improvement over the generic UK shield.
>
> I don't know where you get the idea that a) there is a "UK shield" or
> b) that the mapnik layer is using one. Road references are being shown
> with a rectangle with heavily rounded corners, which AFAIK is not the
> shape of a "shield" in any country, especially not the UK.
>
> Now as for the discussion over whether it's preferable to show road
> numbers superimposed on specific funny shapes on the map, that's one
> I'll leave for cartographers to decide; personally I think it looks
> naff but that doesn't stop other people from doing so.

Indeed. I remember this discussion coming up a year or two ago when
talking about the colouring of roads in the default Mapnik renderer.
Some people wanted each country's roads to be rendered in the style
(colouring etc.) that the locals in that country typically display it
(cueing discussions about how to transition at country boundaries).
However, it was argued (and mostly agreed upon) that we don't want
that. If an American wants to create an American-style map with the
whole world coloured their way, then that's fine. Likewise for a
German or British coloured map. Each map rendering should be uniform
across the world and we should avoid having geographically localised
differentiated rendering schemes within one map. This is of course
just general advice and means nothing about what you do with your own
home-grown renderings. The default Mapnik map, however should remain
homogeneous.

I realise that differently styles road shields are different to
rainbow roads but it's worth keeping in mind.

-- 
Matt Williams
http://milliams.com

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-21 Thread Andy Allan
On Mon, Sep 21, 2009 at 3:33 PM, Richard Weait  wrote:

> I've been operating under the presumption that incremental
> improvements of shield branding across North America would be a good
> thing.  So if initially all county roads show a default county shield
> until the custom, local county shield is included, I think that is an
> improvement over the generic UK shield.

I don't know where you get the idea that a) there is a "UK shield" or
b) that the mapnik layer is using one. Road references are being shown
with a rectangle with heavily rounded corners, which AFAIK is not the
shape of a "shield" in any country, especially not the UK.

Now as for the discussion over whether it's preferable to show road
numbers superimposed on specific funny shapes on the map, that's one
I'll leave for cartographers to decide; personally I think it looks
naff but that doesn't stop other people from doing so.

Cheers,
Andy

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-21 Thread John Smith
2009/9/22 Richard Weait :
> US Routes.  (the "US" is invisible on modern signs, but often spoken
> as "Take US-23 south to Marion Ohio" or "Take Hugh-Ass
> Twanny-thray sah-owth tah Marion Ohio.")
> http://en.wikipedia.org/wiki/U.S._Route_shield

Only half of Ohio is hicks and from what I'm told they migrated from
Kentucky :) *ducks*

> I've been operating under the presumption that incremental
> improvements of shield branding across North America would be a good
> thing.  So if initially all county roads show a default county shield
> until the custom, local county shield is included, I think that is an
> improvement over the generic UK shield.  Thus a tag that supports the
> beauty of increasingly specific categories leading ultimately to the
> right shield.



> Now everything I know about Australian highways I learned from Mel
> Gibson in _The Road Warrior_ so I have much to learn.  What is the
> shield landscape like in Australia?

There is essentially 2 systems, depending on which state you are in
and how  far they've progressed towards an alphanumeric MABC system.

The major of the country has shields similar to the US, we have NH
(National Highway) shields that just have a number on them for routes
funded by both state and federal governments, we also have NR
(National Routes) state funded, but cross state borders, we also have
S (state highways)

http://en.wikipedia.org/wiki/Highways_in_Australia

> Relying on polygons for countries / states / counties may encourage
> both proper ref tagging, and including the right shield graphic.
> Having the correct polygon is a benefit however we get folks to
> provide them.

I'm pretty sure this info, at least to some extent, can be extracted
or extrapolated from TIGER data. In any case as long as the
ref/network is tagged sanely it can be a graceful change over, rather
than requiring a bunch of images all at once.

> Some highways have historic or other cultural weight that earns
> special signs that may resist selection by polygon. How do polygons
> help with the special cases like Route 66 and Santa Fe Trail?
> http://en.wikipedia.org/wiki/Santa_Fe_Trail
> http://en.wikipedia.org/wiki/U.S._Route_66

Probably similar to our T routes (tourist)

http://en.wikipedia.org/wiki/File:Australian_Tourist_Route_2.svg

> Are there special case shields in Australia that you are able to
> address with boundary polygons and postgres?

We should be able to address all shields in Australia using polygons
and meta information, shields only vary here based on state. Local
governments here don't bother shielding routes they fund.

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-21 Thread Richard Weait
On Mon, Sep 21, 2009 at 5:54 AM, John Smith  wrote:
> 2009/9/21 Liz :
>> On Mon, 21 Sep 2009, Apollinaris Schoell wrote:
>>> US is meant for US highway http://en.wikipedia.org/wiki/US_Highways
>>> They uses signs with US printed on it. So the symbol needs the same
>>> which is different from US interstates where only a capital I is
>>> printed on the shield
>> Ok, that would make sense, better than here where we have apparently random
>> letter combinations on shields which don't occur on the signs at all
>> eg NR  NH  S
>> with a numeral which does appear on the highway marker
>
> I don't recall seeing I and US on signs in the US, although it might
> have been the case where I've been.

Oh, signs are cool.

US Routes.  (the "US" is invisible on modern signs, but often spoken
as "Take US-23 south to Marion Ohio" or "Take Hugh-Ass
Twanny-thray sah-owth tah Marion Ohio.")
http://en.wikipedia.org/wiki/U.S._Route_shield

Here is a large collection of Interstate, US Route and some other
shields.  This hints at the diversity of shields.
http://en.wikipedia.org/wiki/List_of_auxiliary_Interstate_Highways

As an indication of scope, here is a list of State highways in New
York, just one densely populated state of fifty.
http://en.wikipedia.org/wiki/List_of_State_Routes_in_New_York

Putnam county is one of sixty-two counties in New York state.  Here is
a list of their county roads. Putnam uses a common "default" county
shield.
http://en.wikipedia.org/wiki/List_of_county_roads_in_Putnam_County,_New_York

Here you can see a few of the non-default county road shields used in
some states.  Similar defaults and special county road shields are
used in Canada as well.
http://en.wikipedia.org/wiki/County_highway

I've been operating under the presumption that incremental
improvements of shield branding across North America would be a good
thing.  So if initially all county roads show a default county shield
until the custom, local county shield is included, I think that is an
improvement over the generic UK shield.  Thus a tag that supports the
beauty of increasingly specific categories leading ultimately to the
right shield.

Now everything I know about Australian highways I learned from Mel
Gibson in _The Road Warrior_ so I have much to learn.  What is the
shield landscape like in Australia?

Relying on polygons for countries / states / counties may encourage
both proper ref tagging, and including the right shield graphic.
Having the correct polygon is a benefit however we get folks to
provide them.

Some highways have historic or other cultural weight that earns
special signs that may resist selection by polygon. How do polygons
help with the special cases like Route 66 and Santa Fe Trail?
http://en.wikipedia.org/wiki/Santa_Fe_Trail
http://en.wikipedia.org/wiki/U.S._Route_66

Are there special case shields in Australia that you are able to
address with boundary polygons and postgres?

Best regards,
Richard

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-21 Thread John Smith
2009/9/21 Liz :
> On Mon, 21 Sep 2009, Apollinaris Schoell wrote:
>> US is meant for US highway http://en.wikipedia.org/wiki/US_Highways
>> They uses signs with US printed on it. So the symbol needs the same
>> which is different from US interstates where only a capital I is
>> printed on the shield
> Ok, that would make sense, better than here where we have apparently random
> letter combinations on shields which don't occur on the signs at all
> eg NR  NH  S
> with a numeral which does appear on the highway marker

I don't recall seeing I and US on signs in the US, although it might
have been the case where I've been.

I-270 shield can be seen in this street view shot:

http://maps.google.com/?ie=UTF8&ll=40.107159,-83.090973&spn=0,359.855804&z=14&layer=c&cbll=40.107047,-83.090972&panoid=ICjdA1-PhqqvaAIU0LrLdA&cbp=12,20.45,,0,-12.46

US route 33 and state route 161 can be seen here:

http://maps.google.com/?ie=UTF8&ll=40.101448,-83.132343&spn=0,359.927902&z=15&layer=c&cbll=40.101653,-83.132123&panoid=fbvnitKC4m487VmCt3QlGQ&cbp=12,237.87,,0,3.5

None of them have lettered prefixes on signs, the lettering occurs
when you refer to them etc.

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-21 Thread Liz
On Mon, 21 Sep 2009, Apollinaris Schoell wrote:
> US is meant for US highway http://en.wikipedia.org/wiki/US_Highways
> They uses signs with US printed on it. So the symbol needs the same
> which is different from US interstates where only a capital I is  
> printed on the shield
Ok, that would make sense, better than here where we have apparently random 
letter combinations on shields which don't occur on the signs at all
eg NR  NH  S
with a numeral which does appear on the highway marker


___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-20 Thread John Smith
2009/9/21 Russ Nelson :
> John Smith writes:
>  > verifiable, if I go to ny county, ny, us I won't know the difference
>  > to the adjcent county etc, we're not supposed to embed symbol
>  > information for the renderer and this is exactly what you are
>  > suggesting we do.
>
> I agree.  You wouldn't.  However, everybody else would look at OSM and
> see the New York State county route shield.  "Oops, this other county
> route lacks the shield.  H what's the difference?  A, I
> see!  This other one needs network=us_ny_ny_co."

What you guys are suggesting is just as bad as tagging each way with
the file name of the shield, you don't do it and you don't tag these
ways with the state or country either what's so specical that these
ways need not only the same information that other tags have been made
redundent but a super duper special new tag to do the same thing.

The country, state and county is rendundent information, it just needs
the specific shield type, eg US, I, etc, the rest can be pulled from
boundary polygons.

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-20 Thread Russ Nelson
John Smith writes:
 > verifiable, if I go to ny county, ny, us I won't know the difference
 > to the adjcent county etc, we're not supposed to embed symbol
 > information for the renderer and this is exactly what you are
 > suggesting we do.

I agree.  You wouldn't.  However, everybody else would look at OSM and
see the New York State county route shield.  "Oops, this other county
route lacks the shield.  H what's the difference?  A, I
see!  This other one needs network=us_ny_ny_co."

-- 
--my blog is athttp://blog.russnelson.com
Crynwr supports open source software
521 Pleasant Valley Rd. | +1 315-323-1241
Potsdam, NY 13676-3213  | Sheepdog   

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-20 Thread John Smith
2009/9/21 Apollinaris Schoell :

> US is meant for US highway http://en.wikipedia.org/wiki/US_Highways
> They uses signs with US printed on it. So the symbol needs the same
> which is different from US interstates where only a capital I is printed on
> the shield

Sorry I thought you meant using US+I at the same time.

> yes shields are very different between states and county shields are
> different again. Even the US shields are not consistent in whole US.
> If the info is derived from state/county polygons that would be awesome and
> avoid tagging for the renderer.

Well that's what this thread was started for, to try and work out how
to achieve it preferably without bloating the mapnik stylesheet, we
just need to alter the pre-processing to attach this information
during import.

> but osm sometimes follows the simple and easy path to get things done. So I
> am not against a hacked solution as long as it doesn't break any established
> use.

Just because it makes things easier in mapnik is probably a good
reason not to do it if it will make things more difficult for other
software developers.

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-20 Thread Apollinaris Schoell

On 20 Sep 2009, at 20:20 , John Smith wrote:

> 2009/9/21 Apollinaris Schoell :
>
>> you shouldn't use well established tags in the wrong way.  
>> us_ny_ny_co is not
>> a  network name. the network is I, US, 
>
> The US but is redundant, we just need to know what shield type, not
> where it is located since there is a country polygon that already
> points this out.
>

US is meant for US highway http://en.wikipedia.org/wiki/US_Highways
They uses signs with US printed on it. So the symbol needs the same
which is different from US interstates where only a capital I is  
printed on the shield

> If there is special shields needed on a per state or per county basis
> they need to be dealt with in other ways, just like they should be on
> a per country basis, you shouldn't have to add this information to
> ways otherwise we might as well tag every single node, way, area etc
> with is_in tags too, again is_in is redundant because we can derive
> this information easily by other means.

yes shields are very different between states and county shields are  
different again. Even the US shields are not consistent in whole US.
If the info is derived from state/county polygons that would be  
awesome and avoid tagging for the renderer.


>
>>  network is useful for routing applications too and should be used  
>> as signed
>> in reality.
>> If we need a tag for mapnik rendering call it mapnik: or
>> shildsymbolizersomething 
>
> If you need to tag for mapnik, mapnik is broken and needs to be fixed
> you should never need to tag for it.

1+
but osm sometimes follows the simple and easy path to get things done.  
So I am not against a hacked solution as long as it doesn't break any  
established use.

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-20 Thread John Smith
2009/9/21 Apollinaris Schoell :

> you shouldn't use well established tags in the wrong way. us_ny_ny_co is not
> a  network name. the network is I, US, 

The US but is redundant, we just need to know what shield type, not
where it is located since there is a country polygon that already
points this out.

If there is special shields needed on a per state or per county basis
they need to be dealt with in other ways, just like they should be on
a per country basis, you shouldn't have to add this information to
ways otherwise we might as well tag every single node, way, area etc
with is_in tags too, again is_in is redundant because we can derive
this information easily by other means.

>  network is useful for routing applications too and should be used as signed
> in reality.
> If we need a tag for mapnik rendering call it mapnik: or
> shildsymbolizersomething 

If you need to tag for mapnik, mapnik is broken and needs to be fixed
you should never need to tag for it.

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-20 Thread Apollinaris Schoell
On Sun, Sep 20, 2009 at 7:10 PM, Richard Weait  wrote:

> On Sun, Sep 20, 2009 at 9:38 PM, John Smith 
> wrote:
> > 2009/9/21 Richard Weait :
> [ ... ]
> >> So I suggest we pattern on network=us_i for Interstates, us_us for US
> >> Routes, us_ny_ny for New York State Routes, us_ny_ny_co for New York
> >> county roads, etc.  These tags should sort nicely alphabetically for
> >> bug-squashing and allow collision avoidance with imperfect knowledge
> >> of other international network naming systems.
> >
> > What you are doing specifically will end up causing inconsistent data
> > because you don't see us_ny_ny_co on signs and people won't tag it.
>
> Dear John,
>
> You underestimate the intelligence of OSM contributors and their
> motivation to make the map better.  Particularly you underestimate
> their wish for better highway shields.  You think increasingly
> specific network tags are too complicated for OSM contributors?  Are
> you familiar with the great success of the Karlsruhe addressing
> Schema?[1] ;-)
>
> They will tag it.  Absolutely they will tag it.  When Mapnik support
> for local shields is adopted on osm.org and announced on talk-US it
> will take less than 7 days for the US Interstate system to have shiny
> new shields from coast to coast.  I'll send you a bottle of Canadian
> Maple Syrup if I am wrong.
>

after more than a year after tiger import still most US highways are
untouched. have no or wrong ref values. broken connections  the list is
endless
nothing will happen in 7 days.


> > In the case of US interstate it should just be network=I, state
> > highways network=S
>
> "S" and "I" are so lacking context as to approach line-noise.
> "us_ny_ny_co" even hints at the right answer, without reading the
> docs.
>
>
you shouldn't use well established tags in the wrong way. us_ny_ny_co is not
a  network name. the network is I, US, 
 network is useful for routing applications too and should be used as signed
in reality.
If we need a tag for mapnik rendering call it mapnik: or
shildsymbolizersomething 



> > That is enough information combined with a database or shape file with
> > all the meta information about what shield exists in which location,
>
> Those are mandatory with your incomplete tags.  They are optional with
> explicit, human-readable tags.
>
> > and defaulting to UK style signs if a localised style hasn't been
> > defined otherwise.
>
> I agree that failover to the UK style shield is better than nothing.
>
> Best regards,
> Richard
>
> [1]
> http://wiki.openstreetmap.org/wiki/Proposed_features/House_numbers/Karlsruhe_Schema
>
> ___
> talk mailing list
> talk@openstreetmap.org
> http://lists.openstreetmap.org/listinfo/talk
>
___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-20 Thread John Smith
2009/9/21 Richard Weait :

> "S" and "I" are so lacking context as to approach line-noise.
> "us_ny_ny_co" even hints at the right answer, without reading the
> docs.

On second thoughts, drop the network tag and just tag a file name:

shield_file_name=us_ny_ny_co__interstate_shield.png

This way you are completely explicit in which shield should be
rendered and it's human readable and all the other points you
mentioned.

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-20 Thread John Smith
2009/9/21 Richard Weait :

> They will tag it.  Absolutely they will tag it.  When Mapnik support
> for local shields is adopted on osm.org and announced on talk-US it
> will take less than 7 days for the US Interstate system to have shiny
> new shields from coast to coast.  I'll send you a bottle of Canadian
> Maple Syrup if I am wrong.

Except they are tagging what they see with street address information,
you don't see what you are suggesting any where, this is meta
information and belongs as such.

> "S" and "I" are so lacking context as to approach line-noise.
> "us_ny_ny_co" even hints at the right answer, without reading the
> docs.

fine, tag it network=interstate_shield, network=state_shield,
network=county_shield, but tagging network=us_ny_ny_co is tagging for
the renderer, you won't ever ever find that on a sign, and it's not
verifiable, if I go to ny county, ny, us I won't know the difference
to the adjcent county etc, we're not supposed to embed symbol
information for the renderer and this is exactly what you are
suggesting we do.

> I agree that failover to the UK style shield is better than nothing.

It's what already exists, I fail to see why this should be an issue.

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-20 Thread Richard Weait
On Sun, Sep 20, 2009 at 9:38 PM, John Smith  wrote:
> 2009/9/21 Richard Weait :
[ ... ]
>> So I suggest we pattern on network=us_i for Interstates, us_us for US
>> Routes, us_ny_ny for New York State Routes, us_ny_ny_co for New York
>> county roads, etc.  These tags should sort nicely alphabetically for
>> bug-squashing and allow collision avoidance with imperfect knowledge
>> of other international network naming systems.
>
> What you are doing specifically will end up causing inconsistent data
> because you don't see us_ny_ny_co on signs and people won't tag it.

Dear John,

You underestimate the intelligence of OSM contributors and their
motivation to make the map better.  Particularly you underestimate
their wish for better highway shields.  You think increasingly
specific network tags are too complicated for OSM contributors?  Are
you familiar with the great success of the Karlsruhe addressing
Schema?[1] ;-)

They will tag it.  Absolutely they will tag it.  When Mapnik support
for local shields is adopted on osm.org and announced on talk-US it
will take less than 7 days for the US Interstate system to have shiny
new shields from coast to coast.  I'll send you a bottle of Canadian
Maple Syrup if I am wrong.

> In the case of US interstate it should just be network=I, state
> highways network=S

"S" and "I" are so lacking context as to approach line-noise.
"us_ny_ny_co" even hints at the right answer, without reading the
docs.

> That is enough information combined with a database or shape file with
> all the meta information about what shield exists in which location,

Those are mandatory with your incomplete tags.  They are optional with
explicit, human-readable tags.

> and defaulting to UK style signs if a localised style hasn't been
> defined otherwise.

I agree that failover to the UK style shield is better than nothing.

Best regards,
Richard

[1] 
http://wiki.openstreetmap.org/wiki/Proposed_features/House_numbers/Karlsruhe_Schema

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-20 Thread John Smith
2009/9/21 Richard Weait :
> In earlier discussions with Paul (cc:'d) we talked about using the
> network key to distinguish road networks that use shields[1].  We had
> agreed on using a ":" separator like "US:I" but I'm arguing against
> that now.  First we are not separating equal items, we're adding
> specificity to one selector.  Second, we're planning to use the
> network values in filenames, we should choose characters that won't
> lead to problems in on OS or another when used as a file name.  Third
> OSM key:values have been lower case other than Proper (Street) Names.
> So I suggest we pattern on network=us_i for Interstates, us_us for US
> Routes, us_ny_ny for New York State Routes, us_ny_ny_co for New York
> county roads, etc.  These tags should sort nicely alphabetically for
> bug-squashing and allow collision avoidance with imperfect knowledge
> of other international network naming systems.

What you are doing specifically will end up causing inconsistent data
because you don't see us_ny_ny_co on signs and people won't tag it.

In the case of US interstate it should just be network=I, state
highways network=S

That is enough information combined with a database or shape file with
all the meta information about what shield exists in which location,
and defaulting to UK style signs if a localised style hasn't been
defined otherwise.

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-20 Thread Richard Weait
On Tue, Sep 15, 2009 at 10:04 PM, John Smith  wrote:
> While my patch works, I don't know if this is the best solution to the
> problem or not:
>
> http://trac.openstreetmap.org/attachment/ticket/1666/osm.xml-patch

I have a similar local hack and decided not to pursue it.  In North
America this approach adds thousands of paragraphs to
osm-template.xml, each paragraph more error prone than the previous.

I'd rather see ShieldSymbolizer able to build an icon filename from
key/value data.

At a minimum this is an improvement in the default osm-template.xml as
we currently have eight paragraphs for the default motorway shield:


  [highway] = 'motorway' and [length] = 8
  100
  100
  


Eight different paragraphs that vary by ref-length.  Just for the
default motorway shield.  Note that this paragraph appears to have an
error as  [length] = 8 and file uses mot_shield7.png.  I pulled this
from svn some time ago so it may have been patched.

Much better, would be to allow something like
file= "%SYMBOLS_DIR%/mot_shield[length].png"
and reduce the default motorway shield to a single paragraph.

More to the point for this thread, this can be extended for localized
shields as something like:


  [network] != ''
  100
  100
  


Superficially this is a complete solution.  All shields selected and
rendered in one paragraph.  But there are things to be solved still.
Selecting a shield is analogous to setting a background color, so font
color will change from shield to shield.  This needs to be solved.
I've removed the height and width parameters as shield will vary in
size.  Does this cause problems later?

This also generalizes away from the non-England problem.  In England,
highway tags correspond with posted signs.  In USA and Canada they do
not.  State routes often make sense meet motorway, trunk, primary and
sometimes secondary standards.  The individual paragraph approach
worked for England but it doesn't scale for the World.

In earlier discussions with Paul (cc:'d) we talked about using the
network key to distinguish road networks that use shields[1].  We had
agreed on using a ":" separator like "US:I" but I'm arguing against
that now.  First we are not separating equal items, we're adding
specificity to one selector.  Second, we're planning to use the
network values in filenames, we should choose characters that won't
lead to problems in on OS or another when used as a file name.  Third
OSM key:values have been lower case other than Proper (Street) Names.
So I suggest we pattern on network=us_i for Interstates, us_us for US
Routes, us_ny_ny for New York State Routes, us_ny_ny_co for New York
county roads, etc.  These tags should sort nicely alphabetically for
bug-squashing and allow collision avoidance with imperfect knowledge
of other international network naming systems.

I've submitted a ticket with Mapnik requesting an extension to
ShieldSymbolizer to support this proposal.  Project lead is currently
on vacation, so let's not swamp him with more requests. ;-)

https://trac.mapnik.org/ticket/352

Best regards,
Richard

[1] http://wiki.openstreetmap.org/wiki/Interstate_Highways_Relations

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-20 Thread Martijn van Oosterhout
On Sun, Sep 20, 2009 at 5:45 AM, John Smith  wrote:
> 2009/9/20 Martijn van Oosterhout :
>
>> I suppose it would be possible to get osm2pgsql to assign columns
>> based on country locations, if the relevant polygons were available in
>> another table. Handling diffs is not the problem, osm2pgsql knows
>> exactly which things have changed and can do the relevent query to
>> supplement the data.
>
> Any thoughts on osm2pgsql patches to do this?
>
> Would be be able to use a shape file for this instead of trying to use
> information that may or may not already exist in the DB?

On the whole I'm not a great fan of shapefile during processing, it
means you have to converts shapes back and forth between various
formats the whole time.

What I was thinking is:

1. Provide a process to read a defined shapefile into the database or
something like that (mind you shp2pgsql already exists ofcourse).
Perhaps the data could be copied from the polygons table depending on
the tag? The thing is you need more attributes, and shapefiles provide
a nice way bundle the extra data (shield types, colours, whatever).

2. Once the data is there, osm2pgsql can use joins to match the shapes
and given the shapes, copy the values with those shapes into extra
columns on the main table. Alternatively, give each shape a number,
store the number with the shapes and let mapnik do the join (saves
tons of disk space, thus time and memory).

As for patches, I don't have time right now, but maybe in the future
(a month or three).

Do you want the country to be determined for all objects, or just
some, like roads?

Have a nice day,
-- 
Martijn van Oosterhout  http://svana.org/kleptog/

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-20 Thread John Smith
2009/9/20 Lennard :
> John Smith wrote:
>
>> They end up in the DB more or less identical, it just means 2 queries
>> or a join etc instead of a simpler query.
>
> Now you're just thinking of a single renderer and its way of processing the
> data. Did you take osmarender into account? How does it handle the road
> relation at this point?

I wasn't talking about tagging, however there is 2 issues here,
tagging and how to get osm2pgsql to cope with this situation.

I wasn't suggesting we're tagging for mapnik/osm2pgsql just how mapnik
deals with it at present, which is part of the current problem on how
to get mapnik to render highway shields on a per country or per state
basis.

> Don't forget it's not that often that a road would cross a boundary and
> continue a long distance. Names change, refs change, maxspeed, surface, etc.
> We're already breaking it up for any number of reasons, at a border.

There is a lot of borders out there, and not just country borders,
state and other administrative borders too so unless something changes
like ref=* it shouldn't be broken up just because it crosses a border
that's for rendering software to cope with.

> But, a bit of preprocessing could also be involved, so that we don't do
> 'tagging for the renderer', if that makes people feel better. :P

It's not about "feeling better" it's about presenting data
consistently for all software, then how each piece of software copes
is up to the author.

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-20 Thread Lennard
John Smith wrote:

> They end up in the DB more or less identical, it just means 2 queries
> or a join etc instead of a simpler query.

Now you're just thinking of a single renderer and its way of processing 
the data. Did you take osmarender into account? How does it handle the 
road relation at this point?

As much as people always say to not tag for the renderer, we should also 
not design tagging specifically geared towards one specific renderer.

>> Indeed, but I'm thinking ahead here, to a situation where the style of the
>> road itself would change at a border.
> 
> The suggestion you made to prevent style bleed sounds like tagging for
> the renderer, if that does occur the renderer should be fixed instead.

Don't forget it's not that often that a road would cross a boundary and 
continue a long distance. Names change, refs change, maxspeed, surface, 
etc. We're already breaking it up for any number of reasons, at a border.

But, a bit of preprocessing could also be involved, so that we don't do 
'tagging for the renderer', if that makes people feel better. :P

-- 
Lennard

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-20 Thread John Smith
2009/9/20 Lennard :
> Relations hold a certain advantage in this case, but we have to consider the
> non-relation variants as well.

They end up in the DB more or less identical, it just means 2 queries
or a join etc instead of a simpler query.

> Indeed, but I'm thinking ahead here, to a situation where the style of the
> road itself would change at a border.

The suggestion you made to prevent style bleed sounds like tagging for
the renderer, if that does occur the renderer should be fixed instead.

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-20 Thread Lennard
John Smith wrote:

> This is one reason to do these sorts of routes as relations instead of
> trying to cram lots of information into the way, you then should avoid
> overlapping shields if the rendering process is doing it's job.

Relations hold a certain advantage in this case, but we have to consider 
the non-relation variants as well.

> If it's just ref numbers changing that shouldn't need anything more
> than to split the way would it?

Indeed, but I'm thinking ahead here, to a situation where the style of 
the road itself would change at a border.

-- 
Lennard

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-19 Thread John Smith
2009/9/20 Lennard :
> Not just countries, but also states (different shields per state, for
> instance). Granted: same thing really.

This is one reason to do these sorts of routes as relations instead of
trying to cram lots of information into the way, you then should avoid
overlapping shields if the rendering process is doing it's job.

> A little birdie once told me of a trick used by a certain map maker.
> Split the border-crossing road twice, so there is only a short section
> that actually crosses the border; probably less than 10 meters. Assign
> one of the styles to that short section, either randomly or by length or
> any other means. Because these sections are so short, it's not
> noticeable on a map, and you don't have "style bleed".

If it's just ref numbers changing that shouldn't need anything more
than to split the way would it?

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-19 Thread John Smith
2009/9/20 Martijn van Oosterhout :

> I suppose it would be possible to get osm2pgsql to assign columns
> based on country locations, if the relevant polygons were available in
> another table. Handling diffs is not the problem, osm2pgsql knows
> exactly which things have changed and can do the relevent query to
> supplement the data.

Any thoughts on osm2pgsql patches to do this?

Would be be able to use a shape file for this instead of trying to use
information that may or may not already exist in the DB?

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-19 Thread Lennard
Martijn van Oosterhout wrote:

> I suppose it would be possible to get osm2pgsql to assign columns
> based on country locations, if the relevant polygons were available in

Not just countries, but also states (different shields per state, for 
instance). Granted: same thing really.

>> One more issue I see is what to do with features that cross these
>> boundaries? Which style will/should they get? Should the import split
>> them into 2 features, each on one side of the boundary?
> 
> Tricky, not something that's going to be solved the first try.

A little birdie once told me of a trick used by a certain map maker. 
Split the border-crossing road twice, so there is only a short section 
that actually crosses the border; probably less than 10 meters. Assign 
one of the styles to that short section, either randomly or by length or 
any other means. Because these sections are so short, it's not 
noticeable on a map, and you don't have "style bleed".


-- 
Lennard

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-19 Thread Martijn van Oosterhout
On Wed, Sep 16, 2009 at 4:46 PM, Lennard  wrote:
> OTOH, if osm2pgsql will only run some queries and let postgis handle the
> stamping of features with a proper field to filter on in the stylesheet,
> it can be done at the end of the import. The challenge to this method is
> in how to handle diffs. You wouldn't want to run through every geometry
> in your database everytime you import diffs, but only the changed ones.

I suppose it would be possible to get osm2pgsql to assign columns
based on country locations, if the relevant polygons were available in
another table. Handling diffs is not the problem, osm2pgsql knows
exactly which things have changed and can do the relevent query to
supplement the data.

> One more issue I see is what to do with features that cross these
> boundaries? Which style will/should they get? Should the import split
> them into 2 features, each on one side of the boundary?

Tricky, not something that's going to be solved the first try.

Have a nice day,
-- 
Martijn van Oosterhout  http://svana.org/kleptog/

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-16 Thread John Smith
2009/9/17 Lennard :

> If those relations get flattened into a planet_osm_line geometry, you have 2
> (or more?) for the same stretch of road. One for the shields, another for
> the name. Join them up in a query, or split shields and names handling
> everywhere and take what you need from the relevant geometries.

Yes, but the information differs.

> OTOH, if osm2pgsql will only run some queries and let postgis handle the
> stamping of features with a proper field to filter on in the stylesheet, it
> can be done at the end of the import. The challenge to this method is in how
> to handle diffs. You wouldn't want to run through every geometry in your
> database everytime you import diffs, but only the changed ones.

It should be possible/best to do it at the end of an update/import and
just tag as needed.

> One more issue I see is what to do with features that cross these
> boundaries? Which style will/should they get? Should the import split them
> into 2 features, each on one side of the boundary?

I would, although I don't really have to figure that out with
Australia being an island and all :)

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-16 Thread Lennard
John Smith wrote:

> This is already dealt with for coast lines, so it shouldn't be much of
> a jump to deal with country borders in a similar way.

Indeed, but a factor to take into account. Only update your internal 
version of the boundary when a newer and valid version is in OSM.

> At present we're using multiple relations where the name changes along
> a route but the ref stays the same and vice versa so it's not possible
> with the current pre-processing that is done to do a nice little query
> to get the shield and name from the same query. I have no idea how to
> fix this.

If those relations get flattened into a planet_osm_line geometry, you 
have 2 (or more?) for the same stretch of road. One for the shields, 
another for the name. Join them up in a query, or split shields and 
names handling everywhere and take what you need from the relevant 
geometries.

> The other biggy is dealing with the country borders during
> pre-processing, again no idea how to do this.

You'd have to supply osm2pgsql with the relevant borders right off the 
bat, before it starts importing. That would mean 2 runs over the planet 
file (ouch!), or publishing a separate file with the relevant data. That 
is if you let osm2pgsql do the processing. As with coastlines, the 
country/state boundaries don't change drastically in the course of 
weeks, so an updated version of the regions could be generated every 
once in a while.

OTOH, if osm2pgsql will only run some queries and let postgis handle the 
stamping of features with a proper field to filter on in the stylesheet, 
it can be done at the end of the import. The challenge to this method is 
in how to handle diffs. You wouldn't want to run through every geometry 
in your database everytime you import diffs, but only the changed ones.

One more issue I see is what to do with features that cross these 
boundaries? Which style will/should they get? Should the import split 
them into 2 features, each on one side of the boundary?


-- 
Lennard

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-16 Thread John Smith
2009/9/16 Lennard :
> You're most welcome to do that, as in #osm-nl we have talked about
> regionalised rendering as well, in the past. I've rolled one small aspect of
> this out on our walking routes map, which renders different shields for The
> Netherlands and Belgium. I did copy our country boundary polygons to another
> table, because if for some reason the country boundary in OSM is non-closed,
> the whole regionalised rendering would fall over.

This is already dealt with for coast lines, so it shouldn't be much of
a jump to deal with country borders in a similar way.

> What were the other issues you had thought up?

At present we're using multiple relations where the name changes along
a route but the ref stays the same and vice versa so it's not possible
with the current pre-processing that is done to do a nice little query
to get the shield and name from the same query. I have no idea how to
fix this.

The other biggy is dealing with the country borders during
pre-processing, again no idea how to do this.

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-16 Thread Lennard
John Smith wrote:

> I didn't think it would be the best option, for most of the reasons
> you point out, however we have to start some where, so I thought I'd
> get the ball rolling.

You're most welcome to do that, as in #osm-nl we have talked about 
regionalised rendering as well, in the past. I've rolled one small 
aspect of this out on our walking routes map, which renders different 
shields for The Netherlands and Belgium. I did copy our country boundary 
polygons to another table, because if for some reason the country 
boundary in OSM is non-closed, the whole regionalised rendering would 
fall over.

My thoughts are that the import process should sort out the hard part of 
this: comparing of features against a polygon, and stamping them with a 
field we can filter on in mapnik. Either by running some sql at the end 
of the import (but should also work for diffs and changed polygons), or 
by doing this itself.

What were the other issues you had thought up?

-- 
Lennard

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-16 Thread John Smith
2009/9/16 Lennard :
> I commented on the ticket.

This is a better place to discuss this than on a bug tracker:

> This aussie patch is /an/ approach, but not necessarily the best. It makes 
> relatively expensive calls to postgis to get the Aussie boundary and compare 
> each route to that. While that may look innocent enough, try extrapolating 
> doing this for 50+ countries. That's even discounting the explosion in the 
> size of osm.xml.

>As a way to handle the expensive postgis calls: I think a much better approach 
>would be to determine locality of features during import, and not during 
>rendering. The import will take longer, sure, but tile rendering should be 
>much faster than using your run-time filtering method.

> On the matter of stylesheet maintainability, XML entities definately come in 
> very handy here, but it will still be a humongous stylesheet. Other 
> approaches like cascadenik should not be discounted for this.

I didn't think it would be the best option, for most of the reasons
you point out, however we have to start some where, so I thought I'd
get the ball rolling.

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-16 Thread Lennard
John Smith wrote:
> While my patch works, I don't know if this is the best solution to the
> problem or not:
> 
> http://trac.openstreetmap.org/attachment/ticket/1666/osm.xml-patch

I commented on the ticket.

-- 
Lennard

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


[OSM-talk] Patch to render names from routes and custom highway shields on a per country basis

2009-09-15 Thread John Smith
While my patch works, I don't know if this is the best solution to the
problem or not:

http://trac.openstreetmap.org/attachment/ticket/1666/osm.xml-patch

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk