Re: [OSM-talk] National borders - mapnik

2008-05-29 Thread Shaun McDonald

On 29 May 2008, at 10:35, Andy Robinson (blackadder-lists) wrote:

 Steve Chilton wrote:
 Sent: 28 May 2008 10:01 PM
 To: Beau Gunderson
 Cc: talk@openstreetmap.org
 Subject: Re: [OSM-talk] National borders - mapnik

 See example from UK: http://dev.openstreetmap.org/~steve8/borders.jpg
 Border between countries England and Scotland is one way (actually  
 probably
 several ways), tagged admin_level=2.
 Border between counties Cumbria and Northumberland is another way/ 
 s, tagged
 admin_level=6.
 Implicitly the country border is part of the collection of ways  
 that make
 up the Cumbria county border.
 There is only one border there, and there only needs to be one way.
 NB: If you want polygons for areas you probably have to post- 
 process the
 data to compile them or use relations to group them.

 This issue comes up with quite a lot of tags. Bus routes for  
 instance where
 you have more than one route reference running along the same way.  
 In that
 instance I use a | between each route reference, could we not do  
 the same
 for admin_level data? ie add all the numbers that are relevant,  
 because in
 some cases perhaps lower ones do not exist for the location.


I would have thought that bus routes would have been done by  
relations, with one or more relations for the whole route. It is then  
up to the renderer to deal with the relations appropriately. This  
means that you can enter more specific information about each route as  
part of the relation tags. It is highly unlikely that a bus route will  
go the same route for the whole route.

Shaun


___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk


Re: [OSM-talk] National borders - mapnik

2008-05-29 Thread Andy Robinson (blackadder-lists)
Steve Chilton wrote:
Sent: 28 May 2008 10:01 PM
To: Beau Gunderson
Cc: talk@openstreetmap.org
Subject: Re: [OSM-talk] National borders - mapnik

See example from UK: http://dev.openstreetmap.org/~steve8/borders.jpg
Border between countries England and Scotland is one way (actually probably
several ways), tagged admin_level=2.
Border between counties Cumbria and Northumberland is another way/s, tagged
admin_level=6.
Implicitly the country border is part of the collection of ways that make
up the Cumbria county border.
There is only one border there, and there only needs to be one way.
NB: If you want polygons for areas you probably have to post-process the
data to compile them or use relations to group them.

This issue comes up with quite a lot of tags. Bus routes for instance where
you have more than one route reference running along the same way. In that
instance I use a | between each route reference, could we not do the same
for admin_level data? ie add all the numbers that are relevant, because in
some cases perhaps lower ones do not exist for the location.

Cheers

Andy


Cheers
STEVE

   -Original Message-
   From: [EMAIL PROTECTED] on behalf of Beau Gunderson
   Sent: Wed 5/28/2008 9:14 PM
   To: Steve Chilton
   Cc: talk@openstreetmap.org
   Subject: Re: [OSM-talk] National borders - mapnik


   Please clarify one thing:

  any border that is both a state and national border should be
tagged at the highest level (in this case national, admin_level=2)

   To me this sounds like there is just one way for the state/national
border... but...

  and the state borders will come in too, with their appropriate
style.

   This sounds like there are two ways, one for the state border and
one
for the national border.

   This seems to make the most sense to me given the second sentence
quoted above.


   Beau


   On Wed, May 28, 2008 at 2:06 PM, Steve Chilton
[EMAIL PROTECTED] wrote:


   Logically, any border that is both a state and national
border
should be tagged at the highest level (in this case national,
admin_level=2).
   Similarly in UK any border that is both county and country
should be tagged at highest level (country, admin_level=2).
   That way all the country borders will show at designated
zoom
levels. When you move to a level that state (or whatever) comes in the
country border will already be there (in its appropriate style) and the
state borders will come in too, with their appropriate style.
   Currently there is an /Else filter which picks up borders
that
have no admin_level set, but it necessarily doesn't come in till higher
zooms, which appears to the case for your example below.

   Cheers
   STEVE


   -Original Message-
   From: [EMAIL PROTECTED] on behalf of Beau Gunderson
   Sent: Wed 5/28/2008 8:42 PM
   To: Steve Chilton
   Cc: talk@openstreetmap.org
   Subject: Re: [OSM-talk] National borders - mapnik



  The US national border with Canada is all tagged with
admin_level=4, border_type=state, border=administrative... It also has the
left/right countries (at least the bit I looked at in WA did).

  How should state borders that are also national
borders
be tagged?

  Does setting admin_level=2 fix the whole problem?

  As you can see, they're not currently visible at low
zooms:

 http://www.openstreetmap.org/?lat=48.83lon=-
118.46zoom=7layers=B00FF


  Beau


  On Wed, May 28, 2008 at 1:21 PM, Steve Chilton
[EMAIL PROTECTED] wrote:


  The latest mapnik stylesheet has the National
borders moved from coming in at z10 to coming in at z7. Now zooms to z6
show the borders as thin blue lines taken from the shape files, and then
switch to OSM data at z7 using a slightly thicker purple line.
  Not all borders show, for one of two reasons
-
either they are not digitised or are not tagged appropriately.
  So, it would be useful if folk have a look at
their own country/area at z7.
  Does in show correctly?
  If not:
  1 - check whether it has been digitised. If
not
- is there a valid, non-copyrighted source for putting in the border
alignment.
  2 - check whether it is tagged
boundary=administrative, admin_level=2. If not - change the tagging to that
so that it may show.

  As a reminder, admin boundaries should be
tagged
for the admin_level that they are (at the highest level). Country/national
borders are always admin_level=2. Internal borders should be tagged
according to the suggested schema

Re: [OSM-talk] National borders - mapnik

2008-05-29 Thread Tom Hughes
In message !!AAAuAOKaD4mR3JBOrEpRon92nMgBANp/[EMAIL 
PROTECTED]
Andy Robinson [EMAIL PROTECTED] wrote:

 This issue comes up with quite a lot of tags. Bus routes for instance where
 you have more than one route reference running along the same way. In that
 instance I use a | between each route reference, could we not do the same
 for admin_level data? ie add all the numbers that are relevant, because in
 some cases perhaps lower ones do not exist for the location.

Well using ';' is more normal for such things, and people have indeed
been doing that for admin_level.

The problem is that it breaks the mapnik rendering as I understand
things because osm2pgsql is only able to import one number into the
database and depending on the version you have I believe it either
fails completely on such multi-valued tags or just imports the first
value and ignores the rest.

What it should probably do in this case is to find the lowest value
and import that, as mapnik will want to render the border in the
most significant style. That might be expensive though.

Tom

-- 
Tom Hughes ([EMAIL PROTECTED])
http://www.compton.nu/

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk


Re: [OSM-talk] National borders - mapnik

2008-05-28 Thread Beau Gunderson
The US national border with Canada is all tagged with admin_level=4,
border_type=state, border=administrative... It also has the left/right
countries (at least the bit I looked at in WA did).

How should state borders that are also national borders be tagged?

Does setting admin_level=2 fix the whole problem?

As you can see, they're not currently visible at low zooms:

   http://www.openstreetmap.org/?lat=48.83lon=-118.46zoom=7layers=B00FF


Beau

On Wed, May 28, 2008 at 1:21 PM, Steve Chilton [EMAIL PROTECTED]
wrote:

 The latest mapnik stylesheet has the National borders moved from coming in
 at z10 to coming in at z7. Now zooms to z6 show the borders as thin blue
 lines taken from the shape files, and then switch to OSM data at z7 using a
 slightly thicker purple line.
 Not all borders show, for one of two reasons - either they are not
 digitised or are not tagged appropriately.
 So, it would be useful if folk have a look at their own country/area at z7.
 Does in show correctly?
 If not:
 1 - check whether it has been digitised. If not - is there a valid,
 non-copyrighted source for putting in the border alignment.
 2 - check whether it is tagged boundary=administrative, admin_level=2. If
 not - change the tagging to that so that it may show.

 As a reminder, admin boundaries should be tagged for the admin_level that
 they are (at the highest level). Country/national borders are always
 admin_level=2. Internal borders should be tagged according to the suggested
 schema for that particular country. Details are on the wiki at:
 http://wiki.openstreetmap.org/index.php/Key:boundary
 which also explains the accepted way to tag for the countries on either
 side of the border.

 Cheers
 STEVE

 ___
 talk mailing list
 talk@openstreetmap.org
 http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk


Re: [OSM-talk] National borders - mapnik

2008-05-28 Thread Ted Mielczarek
On Wed, May 28, 2008 at 3:42 PM, Beau Gunderson [EMAIL PROTECTED] wrote:
 The US national border with Canada is all tagged with admin_level=4,
 border_type=state, border=administrative... It also has the left/right
 countries (at least the bit I looked at in WA did).

 How should state borders that are also national borders be tagged?

I believe those were all imported from the TIGER polygon data, so they
were just state borders originally. The ways might need some massaging
to make a continuous national border.

-Ted

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk


Re: [OSM-talk] National borders - mapnik

2008-05-28 Thread Beau Gunderson
Gotcha... I guess my question is this:

Does it matter if all of those US states don't have a state border way at
the top and there's just one long continuous national border? Or should
those borders be left the way they are, duplicated, the duplicates combined
and then a national border made from that, so that there are state borders
and the national border way next to (or on top of) each other?


Beau

On Wed, May 28, 2008 at 1:49 PM, Ted Mielczarek [EMAIL PROTECTED] wrote:

 On Wed, May 28, 2008 at 3:42 PM, Beau Gunderson [EMAIL PROTECTED]
 wrote:
  The US national border with Canada is all tagged with admin_level=4,
  border_type=state, border=administrative... It also has the left/right
  countries (at least the bit I looked at in WA did).
 
  How should state borders that are also national borders be tagged?

 I believe those were all imported from the TIGER polygon data, so they
 were just state borders originally. The ways might need some massaging
 to make a continuous national border.

 -Ted

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk


Re: [OSM-talk] National borders - mapnik

2008-05-28 Thread Steve Chilton
Logically, any border that is both a state and national border should be tagged 
at the highest level (in this case national, admin_level=2).
Similarly in UK any border that is both county and country should be tagged at 
highest level (country, admin_level=2).
That way all the country borders will show at designated zoom levels. When you 
move to a level that state (or whatever) comes in the country border will 
already be there (in its appropriate style) and the state borders will come in 
too, with their appropriate style.
Currently there is an /Else filter which picks up borders that have no 
admin_level set, but it necessarily doesn't come in till higher zooms, which 
appears to the case for your example below.
 
Cheers
STEVE
 
-Original Message- 
From: [EMAIL PROTECTED] on behalf of Beau Gunderson 
Sent: Wed 5/28/2008 8:42 PM 
To: Steve Chilton 
Cc: talk@openstreetmap.org 
Subject: Re: [OSM-talk] National borders - mapnik



The US national border with Canada is all tagged with admin_level=4, 
border_type=state, border=administrative... It also has the left/right 
countries (at least the bit I looked at in WA did).

How should state borders that are also national borders be tagged?

Does setting admin_level=2 fix the whole problem?

As you can see, they're not currently visible at low zooms:

   
http://www.openstreetmap.org/?lat=48.83lon=-118.46zoom=7layers=B00FF


Beau


On Wed, May 28, 2008 at 1:21 PM, Steve Chilton [EMAIL PROTECTED] 
wrote:


The latest mapnik stylesheet has the National borders moved 
from coming in at z10 to coming in at z7. Now zooms to z6 show the borders as 
thin blue lines taken from the shape files, and then switch to OSM data at z7 
using a slightly thicker purple line.
Not all borders show, for one of two reasons - either they are 
not digitised or are not tagged appropriately.
So, it would be useful if folk have a look at their own 
country/area at z7.
Does in show correctly?
If not:
1 - check whether it has been digitised. If not - is there a 
valid, non-copyrighted source for putting in the border alignment.
2 - check whether it is tagged boundary=administrative, 
admin_level=2. If not - change the tagging to that so that it may show.

As a reminder, admin boundaries should be tagged for the 
admin_level that they are (at the highest level). Country/national borders are 
always admin_level=2. Internal borders should be tagged according to the 
suggested schema for that particular country. Details are on the wiki at:
http://wiki.openstreetmap.org/index.php/Key:boundary
which also explains the accepted way to tag for the countries 
on either side of the border.

Cheers
STEVE

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk




___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk


Re: [OSM-talk] National borders - mapnik

2008-05-28 Thread Beau Gunderson
Please clarify one thing:

   any border that is both a state and national border should be tagged at
the highest level (in this case national, admin_level=2)

To me this sounds like there is just one way for the state/national
border... but...

   and the state borders will come in too, with their appropriate style.

This sounds like there are two ways, one for the state border and one for
the national border.

This seems to make the most sense to me given the second sentence quoted
above.


Beau

On Wed, May 28, 2008 at 2:06 PM, Steve Chilton [EMAIL PROTECTED]
wrote:

 Logically, any border that is both a state and national border should be
 tagged at the highest level (in this case national, admin_level=2).
 Similarly in UK any border that is both county and country should be tagged
 at highest level (country, admin_level=2).
 That way all the country borders will show at designated zoom levels. When
 you move to a level that state (or whatever) comes in the country border
 will already be there (in its appropriate style) and the state borders will
 come in too, with their appropriate style.
 Currently there is an /Else filter which picks up borders that have no
 admin_level set, but it necessarily doesn't come in till higher zooms, which
 appears to the case for your example below.

 Cheers
 STEVE

 -Original Message-
 From: [EMAIL PROTECTED] on behalf of Beau Gunderson
 Sent: Wed 5/28/2008 8:42 PM
 To: Steve Chilton
 Cc: talk@openstreetmap.org
 Subject: Re: [OSM-talk] National borders - mapnik



The US national border with Canada is all tagged with admin_level=4,
 border_type=state, border=administrative... It also has the left/right
 countries (at least the bit I looked at in WA did).

How should state borders that are also national borders be tagged?

Does setting admin_level=2 fix the whole problem?

As you can see, they're not currently visible at low zooms:


 http://www.openstreetmap.org/?lat=48.83lon=-118.46zoom=7layers=B00FF


Beau


On Wed, May 28, 2008 at 1:21 PM, Steve Chilton 
 [EMAIL PROTECTED] wrote:


The latest mapnik stylesheet has the National borders moved
 from coming in at z10 to coming in at z7. Now zooms to z6 show the borders
 as thin blue lines taken from the shape files, and then switch to OSM data
 at z7 using a slightly thicker purple line.
Not all borders show, for one of two reasons - either they
 are not digitised or are not tagged appropriately.
So, it would be useful if folk have a look at their own
 country/area at z7.
Does in show correctly?
If not:
1 - check whether it has been digitised. If not - is there a
 valid, non-copyrighted source for putting in the border alignment.
2 - check whether it is tagged boundary=administrative,
 admin_level=2. If not - change the tagging to that so that it may show.

As a reminder, admin boundaries should be tagged for the
 admin_level that they are (at the highest level). Country/national borders
 are always admin_level=2. Internal borders should be tagged according to the
 suggested schema for that particular country. Details are on the wiki at:
http://wiki.openstreetmap.org/index.php/Key:boundary
which also explains the accepted way to tag for the
 countries on either side of the border.

Cheers
STEVE

___
talk mailing list
talk@openstreetmap.org

 http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk




___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk


Re: [OSM-talk] National borders - mapnik

2008-05-28 Thread Ted Mielczarek
On Wed, May 28, 2008 at 4:14 PM, Beau Gunderson [EMAIL PROTECTED] wrote:
 Please clarify one thing:

any border that is both a state and national border should be tagged at
 the highest level (in this case national, admin_level=2)

 To me this sounds like there is just one way for the state/national
 border... but...

and the state borders will come in too, with their appropriate style.

 This sounds like there are two ways, one for the state border and one for
 the national border.

 This seems to make the most sense to me given the second sentence quoted
 above.


The US state borders are already split into multiple ways, since they
all would have been  250 nodes otherwise. It shouldn't be a problem
to further modify them to make parts of them national borders instead.
Just make sure to keep the left:state/right:state tags as appropriate.
I would agree with Steve that if someone wants to use them as
polygons, they should be post-processing anyway. (Or just using the
original TIGER data, which is shapefiles.)

-Ted

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk