[Talk-br] Validador nacional
Fernando Trebien
fernando.trebien em gmail.com
Sexta Março 14 13:46:20 UTC 2014
"Do not use layer=-1 to *hide warnings* about crossing or overlapping ways.
Either *fix them* or leave the easily visible warning so that others can
fix them."
Quem disse está sendo feito assim "para esconder alertas"? Eu tratei cada
um dos alertas originais, e por fim coloquei layer=-1 no rio. Está de
acordo com a instrução.
"When ways are passing on different levels apply layer=* only to the way
which also has the bridge/tunnel attribute. Only ways with one of the
tags/attributes tunnel=*, bridge=*, highway=steps, highway=elevator,
covered=* should be tagged with the layer tag, similar for railways and
waterways. (...) Rivers and streams should not be tagged with layer -1
along long sections of their length"
Não há uma explicação de por que isso é ruim/errado. Tem algumas pessoas na
página "Discussion" que pensam diferente. Vou copiar alguns trechos:
- "For complex motorway junctions, bridges may themselves be bridged. In
other circumstances, tunnels may themselves be tunneled under. So bridges
can be layer +1, +2, etc. A bridge may go over something which has layer
-1, so the bridge would be *layer 0* etc. etc. Richard B 12:40, 3 September
2008 (UTC)"
- "It's hardly a big issue to have a few objects tagged in this way. *Just
remember also how the renderer works.* Objects in layer -5 are drawn first.
Then objects in layer -4 are drawn on top. Then objects in layer -3 etc.
Finally objects in layer +5 are drawn last. That has got to be simpler than
requiring the renderers to have filters based on defaults for some objects,
and still requiring layer tags for more complicated examples. Remember that
bridges might be tagged bridge=yes, bridge=true, or even ones that specify
what type of bridge it is, bridge=swing etc.For what it's worth, data for
the UK shows (on ways tagged bridge=yes and bridge=true);
2 bridges with layer=-2 (0.0%)
59 bridges with layer=-1 (0.4%)
22 bridges with layer=0 (0.2%)
12813 bridges with layer=1 (91.7%)
896 bridges with layer=2 (6.4%)
126 bridges with layer=3 (0.9%)
43 bridges with layer=4 (0.3%)
9 bridges with layer=5 (0.1%)
So nearly 10% of all bridges are tagged in a different layer than 1.
Tagging something with a layer tag can only be redundant if one implies the
other. It clearly does not. Looking at the stats for tunnels in European
tagging suggests there are *tunnels tagged between layer=3 and layer=-6*."
- "*Only the relative order is important*, *not the actual values used*, so
there is nothing wrong with non-consecutive layers (e.g. object with
layer=4 directly over object with layer=-2), and bridges having negative
and tunnels having positive layers."
- "I use the "layer" key on all *bridges and tunnels. Usually this means
layers 1 and -1*, respectively, but *it gets more complicated in urban
environments*. *Rivers through cities typically get layer=-1 because they
consistently pass under the street level*. *Bridges over such rivers are
often layer=0*, especially if they have intersecting streets immediately at
one or both ends of the bridge. The same is true when a motorway is below
street level. And when a motorway or rail line is consistently above street
level, the whole thing gets "layer=1" and not just the parts that are
actually on bridges. I also try to make both parts of a divided highway be
on the same layer (assuming they're physically at the same level) and make
the transition from one layer to another at about the same point. Generally
speaking, for any two features that cross or are very close to each other,
I try to represent the relative physical height difference. Not only is
this a good semantic representation of the physical world, but doing it
this way (as opposed to bare-minimum use of the layer key) tends to produce
slightly better map renders. That's a win-win. Vid the Kid 23:07, 13 April
2009 (UTC)"
- "This seems self-contradictory: *If layer has no meanings for absolute
heights*, then *it doesn't matter whether to put the layer on the stream or
the bridge*, and whether to choose layer=-1 for the bridge and layer=-4 for
the stream, or 1 and 0 resp."
Eu acho que o problema que você quer evitar vem na resposta a essa última
observação:
- "Of course layer is relative, and you could tag the waterway as layer=-5
and the bridge as layer=-4, but *usually the waterway will not be split
into a small piece* "under the bridge" and "everything else", so the
layer=-5 applies to the whole waterway - and *that is bad*. SvenR 21:07, 23
January 2009 (UTC)"
Não faz sentido considerar errado, já que não afeta nenhuma aplicação - a
não ser validadores, que bem poderiam estar validando uma regra um pouco
mais inteligente como esta: alertar quando 2 linhas com o mesmo valor em
layer (incluindo layer=0 implícito) se cruzam:
- sem ponto compartilhado: quaisquer tipos de vias
- com ponto compartilhado: vias de tipos diferentes (highway+waterway)
Dito isto, como é feito na prática? O rio Tâmisa, em Londres, o rio Sena,
em Paris, e o rio Danúbio, em Viena, estão da forma que você propôs:
layer=0 no rio, layer=1 na ponte. É errado fazer diferente? Pela semântica
da tag, não. É apenas um costume fazer dessa forma, sem uma razão especial.
2014-03-14 6:58 GMT-03:00 Flavio Bello Fialho <bello.flavio em gmail.com>:
> Fernando, acho que não entendeste. Leia a página
> http://wiki.openstreetmap.org/wiki/Key:layer com calma. Ela diz
> explicitamente:
>
> "Do not use layer=-1 to hide warnings about crossing or overlapping ways.
> Either fix them or leave the easily visible warning so that others can fix
> them."
>
> "When ways are passing on different levels apply layer=* only to the way
> which also has the bridge/tunnel attribute. Only ways with one of the
> tags/attributes tunnel=*, bridge=*, highway=steps, highway=elevator,
> covered=* should be tagged with the layer tag, similar for railways and
> waterways."
>
> "Rivers and streams should not be tagged with layer -1 along long sections
> of their length"
>
> Eles estão dizendo explicitamente para NÃO fazer isso que queres fazer. Se
> tens alguma dúvida, discuta na comunidade internacional. Esse é o meu
> último post sobre esse assunto.
>
>
>
> Em 14 de março de 2014 02:08, Fernando Trebien <fernando.trebien em gmail.com
> > escreveu:
>
> Mais além: na verdade, em alguns casos, chega a ser pior marcar as pontes
>> com layer=1 porque isso altera a priorização da renderização no Mapnik. Por
>> exemplo, highway=secondary_link com layer=1 é renderizado por cima de
>> highway=primary (com ou sem layer=0). Isso é o oposto do normal e faz o
>> desenho ficar "feio".
>>
>> Mas o Mapnik não é o único parâmetro. No wiki diz que algumas ferramentas
>> de QA (mas não todas) exigem que o rio tenha layer=-1 e a ponte tenha
>> layer=1. Nada no restante do artigo sugere que isso é, de fato, necessário
>> (pelo contrário). Pra mim, parece uma escolha arbitrária sem muita
>> justificativa (ou seja, um dogma). Colocar layer=-1 no rio ou layer=1 na
>> ponte estão ambos corretos, mas frequentemente uma das opções requer menos
>> trabalho e resulta numa representação menos complexa.
>>
>> E se o próprio artigo diz que não é necessário colocar layer=0 nos casos
>> em que seria esse o valor, me parece que o ideal é, quase sempre, marcar o
>> rio com layer=-1, e nada mais.
>>
>> Claro, daí algumas pessoas poderiam pensar que não precisam marcar a
>> ponte que passa por cima. Por isso concordo que o validador nacional aponte
>> esses casos como "aviso" - que deve ser interpretado com bom senso (assim
>> como os demais avisos do validador do JOSM) de acordo com a definição da
>> tag, não necessariamente como erro.
>> On Mar 14, 2014 1:34 AM, "Fernando Trebien" <fernando.trebien em gmail.com>
>> wrote:
>>
>>> Só complementando, o que layer=0 realmente significa é: desenhe este
>>> objeto depois dos que têm layer=-1, e antes dos que tÊm layer=1. Não
>>> significa nada além disso.
>>>
>>> 2014-03-14 1:30 GMT-03:00 Fernando Trebien <fernando.trebien em gmail.com>:
>>> > Exemplo fácil (inclusive já tinha citado antes): 1 rio + 2 linhas de
>>> > uma via separada. É mais fácil colocar layer=-1 no rio do que colocar
>>> > 2 tags layer=1, uma para cada linha da via.
>>> >
>>> > Um exemplo prático e mais extremo: suponha que seja um rio com várias
>>> > pontes atravessando-o, como é o caso do arroio Dilúvio em Porto
>>> > Alegre. Você teria que colocar layer=1 em cada uma das 54 pontes que o
>>> > cruzam, versus layer=-1 somente no arroio. 54 tags vs 1 tag. (Só pra
>>> > constar: eu revisei uma por uma, e mapeei as que faltavam.)
>>> >
>>> > Não disse que layer=-1 deveria ser aplicada ao rio inteiro. Da mesma
>>> > forma, layer=1 não deveria ser aplicada à via inteira.
>>> >
>>> > Não vamos introduzir regras que não existem. Em nenhum lugar diz que
>>> > layer=0 equivale a "estar no mesmo nível da superfície".
>>> >
>>> > 2014-03-13 22:03 GMT-03:00 Flavio Bello Fialho <bello.flavio em gmail.com
>>> >:
>>> >> "The layer provides absolutely no information about relative or
>>> absolute
>>> >> height difference of objects which do not immediately cross or
>>> overlap. A
>>> >> change in layer should not be used to indicate a change in elevation."
>>> >>
>>> >> Traduzindo:
>>> >>
>>> >> O "layer" não fornece absolutamente nenhuma informação a respeito da
>>> >> diferença de altura relativa ou absoluta de objetos que não se cruzam
>>> ou se
>>> >> sobrepõem. Uma mudança no "layer" não deve ser usada para indicar uma
>>> >> mudança em elevação.
>>> >>
>>> >> O que isso diz é que não há uma relação direta entre a altura e o
>>> layer. Se
>>> >> uma estrada está em cima de um morro e outra no fundo de um vale, o
>>> layer é
>>> >> zero nos dois casos, apesar da ELEVAÇÃO (=ALTITUDE) ser diferente nos
>>> dois
>>> >> casos. É ISSO que está sendo dito no wiki:
>>> >>
>>> >> "A bridge is at layer 1 even if it is only several feet above sea
>>> level
>>> >> while the peak of Mount Everest is at layer 0 even though it is 8848
>>> meters
>>> >> above sea level."
>>> >>
>>> >> A mesma página ainda diz:
>>> >>
>>> >> "Use the smallest suitable layer value. Only use layer=2 for a bridge
>>> that
>>> >> passes over a feature that is already at level 1; similarly only use
>>> >> layer=-2 for a tunnel that passes below another tunnel."
>>> >>
>>> >> O menor valor possível é zero. Como a imensa maioria dos atributos
>>> mapeados
>>> >> está na superfície, ela é mapeada no layer 0. É a forma que mantém os
>>> >> valores no seu mínimo. Por favor, cite uma situação em que não seja
>>> útil que
>>> >> a superfície esteja no layer 0, pois não consigo imaginar nenhum caso.
>>> >>
>>> >> "Features at layer 0 should not normally have a layer tag"
>>> >>
>>> >> Ou seja, não só não é obrigatório, é recomendável que se elimine o tag
>>> >> "layer" quando ele for igual a zero. A página cita explicitamente que
>>> rios
>>> >> NÃO devem estar no layer -1:
>>> >>
>>> >> "Rivers and streams should not be tagged with layer -1 along their
>>> entire
>>> >> length or long sections"
>>> >>
>>> >> Em 13/03/2014 20:54, "Fernando Trebien" <fernando.trebien em gmail.com>
>>> >> escreveu:
>>> >>
>>> >>> "The layer provides absolutely no information about relative or
>>> >>> absolute height difference of objects which do not immediately cross
>>> >>> or overlap. A change in layer should not be used to indicate a change
>>> >>> in elevation." [http://wiki.openstreetmap.org/wiki/Key:layer]
>>> >>>
>>> >>> Portanto, não é obrigatório que layer=0 seja aplicado a algo que está
>>> >>> na superfície. Pode até ser costume (ou um bom costume), mas não é
>>> >>> obrigatório, e certamente há situações em que não é muito útil seguir
>>> >>> essa regra. Além disso, não é obrigatório colocar layer=0 porque esse
>>> >>> é o valor padrão. (Diz isso no mesmo artigo.)
>>> >>>
>>> >>> 2014-03-13 20:15 GMT-03:00 Flavio Bello Fialho <
>>> bello.flavio em gmail.com>:
>>> >>> > Layer e level são coisas diferentes. Layer 0 está no nível da
>>> >>> > superfície.
>>> >>> > Quando duas coisas se sobrepõem, a que não está no nível da
>>> superfície
>>> >>> > fica
>>> >>> > com layer=1 (ex: ponte) ou layer=-1 (ex: túnel). Um rio só deve ter
>>> >>> > layer=-1
>>> >>> > quando estiver embaixo da terra, canalizado. Lençol freático é uma
>>> coisa
>>> >>> > completamente diferente. Level não tem nada a ver com layer. É o
>>> andar
>>> >>> > de um
>>> >>> > edifício.
>>> >>> >
>>> >>> > Em 13/03/2014 13:48, "Fernando Trebien" <
>>> fernando.trebien em gmail.com>
>>> >>> > escreveu:
>>> >>> >
>>> >>> >> Valor "0" para algo no nível do chão vale só para "level", em
>>> "layer"
>>> >>> >> a escolha é livre porque não representa a "altura" (no sentido
>>> físico)
>>> >>> >> e sim a "ordem de desenho".
>>> >>> >>
>>> >>> >> 2014-03-13 12:43 GMT-03:00 Flavio Bello Fialho
>>> >>> >> <bello.flavio em gmail.com>:
>>> >>> >> > O tag layer deve ser relativo à superfície da terra ou água
>>> >>> >> > (layer=0).
>>> >>> >> > Qualquer coisa acima deve ter layer positivo e qualquer coisa
>>> abaixo
>>> >>> >> > deve
>>> >>> >> > ter layer negativo.
>>> >>> >> >
>>> >>> >> > Em 12/03/2014 17:57, "Fernando Trebien" <
>>> fernando.trebien em gmail.com>
>>> >>> >> > escreveu:
>>> >>> >> >
>>> >>> >> >> Ah bom, então tá perfeito. :D
>>> >>> >> >>
>>> >>> >> >> 2014-03-12 16:24 GMT-03:00 Nelson A. de Oliveira <
>>> naoliv em gmail.com>:
>>> >>> >> >> > 2014-03-12 16:16 GMT-03:00 Fernando Trebien
>>> >>> >> >> > <fernando.trebien em gmail.com>:
>>> >>> >> >> >> Bem, posso estar falando bobagem (não cheguei a testar esse
>>> caso
>>> >>> >> >> >> com
>>> >>> >> >> >> o
>>> >>> >> >> >> validador ainda), só acho que não deveria ser tratado como
>>> >>> >> >> >> "erro",
>>> >>> >> >> >> só
>>> >>> >> >> >> como "aviso" (ou "alerta"), pra seguir a mesma idéia dos
>>> outros
>>> >>> >> >> >> avisos
>>> >>> >> >> >> do validador do JOSM.
>>> >>> >> >> >
>>> >>> >> >> > Mas não é erro :-)
>>> >>> >> >> > É um aviso. E a mensagem do aviso começa justamente com
>>> >>> >> >> > "verificar:
>>> >>> >> >> > ..."
>>> >>> >> >> >
>>> >>> >> >> > _______________________________________________
>>> >>> >> >> > Talk-br mailing list
>>> >>> >> >> > Talk-br em openstreetmap.org
>>> >>> >> >> > https://lists.openstreetmap.org/listinfo/talk-br
>>> >>> >> >>
>>> >>> >> >>
>>> >>> >> >>
>>> >>> >> >> --
>>> >>> >> >> Fernando Trebien
>>> >>> >> >> +55 (51) 9962-5409
>>> >>> >> >>
>>> >>> >> >> "The speed of computer chips doubles every 18 months."
>>> (Moore's law)
>>> >>> >> >> "The speed of software halves every 18 months." (Gates' law)
>>> >>> >> >>
>>> >>> >> >> _______________________________________________
>>> >>> >> >> Talk-br mailing list
>>> >>> >> >> Talk-br em openstreetmap.org
>>> >>> >> >> https://lists.openstreetmap.org/listinfo/talk-br
>>> >>> >> >
>>> >>> >> >
>>> >>> >> > _______________________________________________
>>> >>> >> > Talk-br mailing list
>>> >>> >> > Talk-br em openstreetmap.org
>>> >>> >> > https://lists.openstreetmap.org/listinfo/talk-br
>>> >>> >> >
>>> >>> >>
>>> >>> >>
>>> >>> >>
>>> >>> >> --
>>> >>> >> Fernando Trebien
>>> >>> >> +55 (51) 9962-5409
>>> >>> >>
>>> >>> >> "The speed of computer chips doubles every 18 months." (Moore's
>>> law)
>>> >>> >> "The speed of software halves every 18 months." (Gates' law)
>>> >>> >>
>>> >>> >> _______________________________________________
>>> >>> >> Talk-br mailing list
>>> >>> >> Talk-br em openstreetmap.org
>>> >>> >> https://lists.openstreetmap.org/listinfo/talk-br
>>> >>> >
>>> >>> >
>>> >>> > _______________________________________________
>>> >>> > Talk-br mailing list
>>> >>> > Talk-br em openstreetmap.org
>>> >>> > https://lists.openstreetmap.org/listinfo/talk-br
>>> >>> >
>>> >>>
>>> >>>
>>> >>>
>>> >>> --
>>> >>> Fernando Trebien
>>> >>> +55 (51) 9962-5409
>>> >>>
>>> >>> "The speed of computer chips doubles every 18 months." (Moore's law)
>>> >>> "The speed of software halves every 18 months." (Gates' law)
>>> >>>
>>> >>> _______________________________________________
>>> >>> Talk-br mailing list
>>> >>> Talk-br em openstreetmap.org
>>> >>> https://lists.openstreetmap.org/listinfo/talk-br
>>> >>
>>> >>
>>> >> _______________________________________________
>>> >> Talk-br mailing list
>>> >> Talk-br em openstreetmap.org
>>> >> https://lists.openstreetmap.org/listinfo/talk-br
>>> >>
>>> >
>>> >
>>> >
>>> > --
>>> > Fernando Trebien
>>> > +55 (51) 9962-5409
>>> >
>>> > "The speed of computer chips doubles every 18 months." (Moore's law)
>>> > "The speed of software halves every 18 months." (Gates' law)
>>>
>>>
>>>
>>> --
>>> Fernando Trebien
>>> +55 (51) 9962-5409
>>>
>>> "The speed of computer chips doubles every 18 months." (Moore's law)
>>> "The speed of software halves every 18 months." (Gates' law)
>>>
>>
>> _______________________________________________
>> Talk-br mailing list
>> Talk-br em openstreetmap.org
>> https://lists.openstreetmap.org/listinfo/talk-br
>>
>>
>
>
> --
> Flávio Bello Fialho
> bello.flavio em gmail.com
>
> _______________________________________________
> Talk-br mailing list
> Talk-br em openstreetmap.org
> https://lists.openstreetmap.org/listinfo/talk-br
>
>
--
Fernando Trebien
+55 (51) 9962-5409
"The speed of computer chips doubles every 18 months." (Moore's law)
"The speed of software halves every 18 months." (Gates' law)
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://lists.openstreetmap.org/pipermail/talk-br/attachments/20140314/d36dbbf9/attachment-0001.html>
Mais detalhes sobre a lista de discussão Talk-br