Re: [OSM-talk] Mulltipolygons and Mapnik

2008-06-01 Thread Martijn van Oosterhout
On Sat, May 31, 2008 at 9:32 PM, Jon Burgess [EMAIL PROTECTED] wrote:
 I believe the sites are both using very similar code (unless Kleptog has
 some private changes for the NL site). I think the difference may be due
 to the NL site using the --slim mode. In this case this is probably
 allowing it to keep the untagged inner way that would have been
 discarded in non-slim mode.

Correct, the --slim mode makes all the difference.

The basic problem is that to manage such relations it needs to
remember the relevent ways for when it processes the relations. When
processing a whole planet dump it obviously can't rememeber all the
ways in memory, which is why non-slim mode doesn't get it. Slim mode
remembers everything and so it always works.

It would be possible to get non-slim mode to work also by processing
relations first. As usual, needs a coder.

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

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


Re: [OSM-talk] Mulltipolygons and Mapnik

2008-05-31 Thread Cartinus
On Saturday 31 May 2008 19:07:31 Dermot McNally wrote:
 Multipolygons with untagged inner elements (per wiki): Don't render on
 Mapnik Multipolygons with inner elements tagged as the outer ones: Do
 render on Mapnik

 At this point, we _could_ define the current behaviour as a standard,
 update the wiki and change whatever data isn't compliant.

 *or* we can see if the Mapnik brains are willing/able to support
 multipolygons according to the current wiki instructions.

Here in Utrecht I have drawn a building with a courtyard. The inner polygon 
does not have any tags.
* The hole shows OK in [EMAIL PROTECTED]/Osmarender
http://tile.openstreetmap.nl/?zoom=17lat=52.08396lon=5.10485layers=00BF
* The hole does not show in the osm2pgsql/Mapnik generated tiles from 
openstreetmap.org.
http://tile.openstreetmap.nl/?zoom=17lat=52.08396lon=5.10485layers=0B0F
* The hole shows OK in the osm2pgsql/Mapnik generated tiles from 
openstreetmap.nl.
http://tile.openstreetmap.nl/?zoom=17lat=52.08396lon=5.10485layers=B00F

I think openstreetmap.nl uses a newer version of osm2pgsql than the main site. 
If that is true than it is just a question of time till multipolygons defined 
as per wiki description will show OK on the main site too.

A multipolygon with the same tags on inner and outer shows OK at all three:
http://tile.openstreetmap.nl/?zoom=15lat=52.05845lon=5.16772layers=00BF
http://tile.openstreetmap.nl/?zoom=15lat=52.05845lon=5.16772layers=0B0F
http://tile.openstreetmap.nl/?zoom=15lat=52.05845lon=5.16772layers=B00F


-- 
m.v.g.,
Cartinus

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


Re: [OSM-talk] Mulltipolygons and Mapnik

2008-05-31 Thread Cartinus
I forgot to mention:

A hole filled with something else IOW different tags on the outer and inner 
polygons only works in [EMAIL PROTECTED]/Osmarender

http://tile.openstreetmap.nl/?zoom=17lat=52.06243lon=5.10283layers=00BF
http://tile.openstreetmap.nl/?zoom=17lat=52.06243lon=5.10283layers=0B0F
http://tile.openstreetmap.nl/?zoom=17lat=52.06243lon=5.10283layers=B00F

(You can just use the layer switcher on the page in stead of opening each link 
separately.)

-- 
m.v.g.,
Cartinus

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


Re: [OSM-talk] Mulltipolygons and Mapnik

2008-05-31 Thread Dermot McNally
2008/5/31 Chris Hill [EMAIL PROTECTED]:

 I've already changed the wiki to match this situation.  This is the way it
 was, so we are just back to the same position before it was changed (in my
 view) erroneously.

Hmm. Could you have missed a bit?

Tags on inner ways describe the hole. If it's just a hole, leave it untagged.

Dermot

-- 
--
Iren sind menschlich

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


Re: [OSM-talk] Mulltipolygons and Mapnik

2008-05-31 Thread Chris Hill
Dermot McNally wrote:
 2008/5/31 Chris Hill [EMAIL PROTECTED]:

   
 I've already changed the wiki to match this situation.  This is the way it
 was, so we are just back to the same position before it was changed (in my
 view) erroneously.
 

 Hmm. Could you have missed a bit?

 Tags on inner ways describe the hole. If it's just a hole, leave it 
 untagged.

 Dermot

   
Er, yeah, so I had another go with my eyes open this time.

Chris

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


Re: [OSM-talk] Mulltipolygons and Mapnik

2008-05-31 Thread Jon Burgess
On Sat, 2008-05-31 at 20:08 +0200, Cartinus wrote:
 I forgot to mention:
 
 A hole filled with something else IOW different tags on the outer and inner 
 polygons only works in [EMAIL PROTECTED]/Osmarender
 
 http://tile.openstreetmap.nl/?zoom=17lat=52.06243lon=5.10283layers=00BF
 http://tile.openstreetmap.nl/?zoom=17lat=52.06243lon=5.10283layers=0B0F
 http://tile.openstreetmap.nl/?zoom=17lat=52.06243lon=5.10283layers=B00F

I'm not certain which polygons you are talking about here. If you are
talking about the ones to the NW, then those look like they are marked
with area=yes. Support for area=yes was only recently added to the
osm2pgsql code and the rendering styles have not been implemented yet.

Mapnik will render inner areas with different tags. It uses the area of
the polygons to figure out the render ordering. Smaller areas always
render on top of larger areas of the same layer. If the layer tags
differ then this will take precedence.

Jon




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


Re: [OSM-talk] Mulltipolygons and Mapnik

2008-05-31 Thread Jon Burgess
On Sat, 2008-05-31 at 19:54 +0200, Cartinus wrote:
 Here in Utrecht I have drawn a building with a courtyard. The inner
 polygon 
 does not have any tags.
 * The hole shows OK in [EMAIL PROTECTED]/Osmarender
 http://tile.openstreetmap.nl/?zoom=17lat=52.08396lon=5.10485layers=00BF
 * The hole does not show in the osm2pgsql/Mapnik generated tiles from 
 openstreetmap.org.
 http://tile.openstreetmap.nl/?zoom=17lat=52.08396lon=5.10485layers=0B0F
 * The hole shows OK in the osm2pgsql/Mapnik generated tiles from 
 openstreetmap.nl.
 http://tile.openstreetmap.nl/?zoom=17lat=52.08396lon=5.10485layers=B00F
 
 I think openstreetmap.nl uses a newer version of osm2pgsql than the
 main site. 
 If that is true than it is just a question of time till multipolygons
 defined 
 as per wiki description will show OK on the main site too.

I believe the sites are both using very similar code (unless Kleptog has
some private changes for the NL site). I think the difference may be due
to the NL site using the --slim mode. In this case this is probably
allowing it to keep the untagged inner way that would have been
discarded in non-slim mode. 

 A multipolygon with the same tags on inner and outer shows OK at all
 three:
 http://tile.openstreetmap.nl/?zoom=15lat=52.05845lon=5.16772layers=00BF
 http://tile.openstreetmap.nl/?zoom=15lat=52.05845lon=5.16772layers=0B0F
 http://tile.openstreetmap.nl/?zoom=15lat=52.05845lon=5.16772layers=B00F
 
Right, this is normally the best approach.

Jon



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


Re: [OSM-talk] Mulltipolygons and Mapnik

2008-05-31 Thread Robert Vollmert

On May 31, 2008, at 19:27, Chris Hill wrote:

 I've already changed the wiki to match this situation.  This is the  
 way
 it was, so we are just back to the same position before it was changed
 (in my view) erroneously.

 I also thing this makes logical sense too.  The outer marks the edge  
 of
 the water and so does the inner.  There is a short discuusion on the
 wiki talk page.

As far as I can tell, the main argument for this reversion is that's  
what the renderers want.

I wonder why those who claim the change was wrong didn't speak up in  
the lengthy discussions in March? (Starting at 
http://lists.openstreetmap.org/pipermail/talk/2008-March/023876.html 
  and http://lists.openstreetmap.org/pipermail/dev/2008-March/009345.html 
, and I do remember one opposing opinion which I can't find.)

Cheers
Robert



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


Re: [OSM-talk] Mulltipolygons and Mapnik

2008-05-24 Thread Martijn van Oosterhout
On Sat, May 24, 2008 at 1:01 AM, Dermot McNally [EMAIL PROTECTED] wrote:
 It's worth a try, and we'll know in a week, but I'm not so sure this
 will cure the problem. Otherwise, how do you explain the island that
 already was tagged the same but still didn't render on the mapnik
 layer? I'm also about 90% sure that I've seen untagged islands with an
 inner role in the relations showing up OK in the past.

Also, when reporting these kinds of issues it's very helpful to
provide the ID of the relation, because then it only takes seconds to
see if its tagged properly. Don't discount the possibility of bugs in
renderers

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

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


Re: [OSM-talk] Mulltipolygons and Mapnik

2008-05-23 Thread Ludwig
I noticed this also. Without investigating it any further, my hunch was that
only the first island is rendered.

This lake has two islands, but only one shows up in Mapnik:

http://geo.topf.org/comparison/index.html?mt0=tahmt1=mapnikx=1959y=1305z=12

Ludwig

2008/5/23 Dermot McNally [EMAIL PROTECTED]:

 Folks,

 I've just noticed that the Mapnik layer isn't showing islands
 correctly in some lakes where I had modelled them as holes via
 multipolygon relations. Example:


 http://geo.topf.org/comparison/index.html?mt0=tahmt1=mapnikx=1959y=1305z=12

 I thought that Mapnik was able to handle this. Am I mistaken, or might
 there be recent breakage?

 Thanks,
 Dermot

 --
 --
 Iren sind menschlich

 ___
 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] Mulltipolygons and Mapnik

2008-05-23 Thread Jukka Rahkonen
Dermot McNally dermotm at gmail.com writes:



 Unfortunately, I don't think that's the problem:
 

http://geo.topf.org/comparison/index.html?mt0=tahmt1=mapniklon=-8.1250762lat=53.9649733z=13
 
 This example has only one island, and that doesn't show either.
 
 Dermot


Hi,

Have you tried adding the lake tag (natural=water)also for the holes?  I know it
works with buildings but I do not know if it is necessary.

-Jukka Rahkonen-





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


Re: [OSM-talk] Mulltipolygons and Mapnik

2008-05-23 Thread Ludwig
The holes, at least for my example, are land (so natural=land).

2008/5/23 Jukka Rahkonen [EMAIL PROTECTED]:

 Dermot McNally dermotm at gmail.com writes:

 

  Unfortunately, I don't think that's the problem:
 
 

 http://geo.topf.org/comparison/index.html?mt0=tahmt1=mapniklon=-8.1250762lat=53.9649733z=13
 
  This example has only one island, and that doesn't show either.
 
  Dermot


 Hi,

 Have you tried adding the lake tag (natural=water)also for the holes?  I
 know it
 works with buildings but I do not know if it is necessary.

 -Jukka Rahkonen-





 ___
 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] Mulltipolygons and Mapnik

2008-05-23 Thread Dermot McNally
2008/5/23 Jukka Rahkonen [EMAIL PROTECTED]:

 Have you tried adding the lake tag (natural=water)also for the holes?  I know 
 it
 works with buildings but I do not know if it is necessary.

It won't help here either - my second example already has the holes
tagged. Good thought, though.

Dermot

-- 
--
Iren sind menschlich

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


Re: [OSM-talk] Mulltipolygons and Mapnik

2008-05-23 Thread Dermot McNally
2008/5/23 Ludwig [EMAIL PROTECTED]:
 The holes, at least for my example, are land (so natural=land).

It's not what's causing the problem, but to me that's just incorrect.
Valid tagging to me could be:

Untagged: It's just a hole in whatever its parent polygon is.
Tagged water: It's a hole in something that is water, so it identifies
itself as a water hole

To tag it as land _and_ make it part of a multipolygon seems to be a
double negative.

Dermot

-- 
--
Iren sind menschlich

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


Re: [OSM-talk] Mulltipolygons and Mapnik

2008-05-23 Thread Ludwig
I was just trying to follow the rules from
http://wiki.openstreetmap.org/index.php/Map_Features:

   - Land that exists within another area, such as a lake. (i.e an island).
   Keep water on the right and land on the left side in relation to sequence of
   nodes in the Way. Layering may also be required. See
   
Relations/Multipolygonhttp://wiki.openstreetmap.org/index.php/Relations/Multipolygonfor
islands in lakes

I agree that the land-tag itself is redundant, so maybe the instructions
should change.

Ludwig

2008/5/23 Dermot McNally [EMAIL PROTECTED]:

 2008/5/23 Ludwig [EMAIL PROTECTED]:
  The holes, at least for my example, are land (so natural=land).

 It's not what's causing the problem, but to me that's just incorrect.
 Valid tagging to me could be:

 Untagged: It's just a hole in whatever its parent polygon is.
 Tagged water: It's a hole in something that is water, so it identifies
 itself as a water hole

 To tag it as land _and_ make it part of a multipolygon seems to be a
 double negative.

 Dermot

 --
 --
 Iren sind menschlich

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


Re: [OSM-talk] Mulltipolygons and Mapnik

2008-05-23 Thread Cartinus
On Friday 23 May 2008 21:18:40 Ludwig wrote:
- Land that exists within another area, such as a lake. (i.e an island).
Keep water on the right and land on the left side in relation to
 sequence of nodes in the Way. Layering may also be required. See
  
  Relations/Multipolygonhttp://wiki.openstreetmap.org/index.php/Relations/M
ultipolygonfor islands in lakes

You either hack around with natural=land and layers (which is bad practice 
IMHO) or you use multipolygons. Trying to do both at once is just weird (and 
not really what that text is trying to say.)

- - - - - - - - 

After the last round of discussions about how to tag multipolygons I left some 
tagged in different ways around my home city. I just checked the current 
state of their renders.

1)
outer tagged with feature X  inner tagged with feature X
- Works with osm2pgsql used on the main site (i.e. the mapnik layer)
- Works with Osmarender

2)
outer tagged with feature X  inner not tagged at all
- Does not work with osm2pgsql used on the main site (i.e. the mapnik layer)
- Works with Osmarender

3)
outer tagged with feature X  inner tagged with feature Y
- Does not work with osm2pgsql used on the main site (i.e. the mapnik layer)
- Does not work with Osmarender

So your first example doesn't show the islands because they are not having 
tags. I don't know why the island in the second example doesn't work. The 
relation and both the inner and outer polygon look OK.

-- 
m.v.g.,
Cartinus

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


Re: [OSM-talk] Mulltipolygons and Mapnik

2008-05-23 Thread Dermot McNally
2008/5/23 Chris Hill [EMAIL PROTECTED]:
 I've worked with islands before.  It seems that the key points are:
 1. make sure that the same tag is used on the inner and outer, in this case
 natural=water
 2. Make sure that the outer is clockwise and inner(s) are anticlockwise

 I took the liberty of changing the islands to match their outer so I expect
 it to render.

It's worth a try, and we'll know in a week, but I'm not so sure this
will cure the problem. Otherwise, how do you explain the island that
already was tagged the same but still didn't render on the mapnik
layer? I'm also about 90% sure that I've seen untagged islands with an
inner role in the relations showing up OK in the past.

Regardless, we need to decide:

* What version of this tagging we think _should_ be considered correct.
* Ensure both main renderers will accept the valid form.
* Adapt the wiki as required to reflect reality

Dermot

-- 
--
Iren sind menschlich

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