| 382 | | |
| 383 | | |
| | 382 | *[/^(name|name:pt)$/ =~ /(?i)(?u)\b(Stande?|Automóveis|Concessionário)\b/][shop != car] { |
| | 383 | throwWarning: tr("PORTUGAL-Stande de Automóveis deve ter shop=car"); |
| | 384 | } |
| | 385 | *[/^(name|name:pt)$/ =~ /(?i)(?u)(Repara(ção|ções|dor|dores) (de )? Auto(móveis)?|Car Service|Oficina)/][name][shop != car_repair][!highway][!boundary][!place][!amenity] { |
| | 386 | throwWarning: tr("PORTUGAL-Reparador de Automóveis deve ter shop=car_repair"); |
| | 387 | } |
| | 388 | *[/^(name|name:pt)$/ =~ /(?i)(?u)Lavagem/][name][amenity != car_wash] { |
| | 389 | throwWarning: tr("PORTUGAL-Local de Lavagem de Automóveis deve ter amenity=car_wash"); |
| | 390 | } |
| | 391 | *[/^(name|name:pt)$/ =~ /(?i)(?u)Park Meter/][name][amenity != vending_machine] { |
| | 392 | throwWarning: tr("PORTUGAL-Máquina de bilhetes de parque de estacionamento deve ter amenity=vending_machine e vending=parking_tickets"); |
| | 393 | } |
| | 394 | *[/^(name|name:pt)$/ =~ /^(?i)(?u)(Hospital|Centro Hospitalar|(Centro|Extensão) (de )?Saúde) /][name][building][building != hospital] { |
| | 395 | throwWarning: tr("PORTUGAL-Edifício de Hospital ou Centro de Saúde deve ter building=hospital"); |
| | 396 | } |
| | 397 | *[/^(name|name:pt)$/ =~ /^(?i)(?u)(Hospital|Centro Hospitalar|(Centro|Extensão) (de )?Saúde) /][name][amenity][amenity != hospital][/^(name|name:pt)$/ !~ /(?i)(?u)\b(Parque|Estacionamento)\b/] { |
| | 398 | throwWarning: tr("PORTUGAL-Hospital e Centro de Saúde deve ter amenity=hospital"); |
| | 399 | } |
| | 400 | *[/^(name|name:pt)$/ =~ /^(?i)(?u)(Cabine|Posto de Transformador) ((da )? EDP)/][name][building != transformer_tower], |
| | 401 | *[/^(name|name:pt)$/ =~ /^(?i)(?u)(Cabine|Posto de Transformador) ((da )? EDP)/][name][power != substation], |
| | 402 | *[/^(name|name:pt)$/ =~ /^(?i)(?u)(Cabine|Posto de Transformador) ((da )? EDP)/][name][substation != minor_distribution], |
| | 403 | *[building = transformer_tower][name][power != substation], |
| | 404 | *[building = transformer_tower][name][substation != minor_distribution] { |
| | 405 | throwWarning: tr("PORTUGAL-Cabine da EDP deve ter building=transformer_tower power=substation e substation=minor_distribution"); |
| | 406 | } |
| | 407 | *[/^(name|name:pt)$/ =~ /^(?i)(?u)Estação (de Comboios|Ferroviária|(da)? CP|(dos )?Caminhos de Ferro) /][name][building != train_station][public_transport != station] { |
| | 408 | throwWarning: tr("PORTUGAL-Estação de Comboios sem building=train_station ou public_transport=station"); |
| | 409 | } |
| | 410 | *[/^(name|name:pt)$/ =~ /(?i)(?u)((Encerr|Fech)(ou|ado)|Desocupad[ao])/], |
| | 411 | *[description =~ /(?i)(?u)((Encerr|Fech)(ou|ado)|Desocupad[ao])/], |
| | 412 | *[note =~ /(?i)(?u)((Encerr|Fech)(ou|ado)|Desocupad[ao])/], |
| | 413 | *[designation =~ /(?i)(?u)((Encerr|Fech)(ou|ado)|Desocupad[ao])/] { |
| | 414 | throwWarning: tr("PORTUGAL-Estabelecimento encerrado deve ter disused:shop=yes, disused:amenity=bar..."); |
| | 415 | } |
| | 416 | *[/^(name|name:pt)$/ =~ /(?i)(?u)(Abandon(ad[ao]|o)|Degrada(d[ao]|ção))/], |
| | 417 | *[description =~ /(?i)(?u)(Abandon(ad[ao]|o)|Degrada(d[ao]|ção))/], |
| | 418 | *[note =~ /(?i)(?u)(Abandon(ad[ao]|o)|Degrada(d[ao]|ção))/], |
| | 419 | *[designation =~ /(?i)(?u)(Abandon(ad[ao]|o)|Degrada(d[ao]|ção))/] { |
| | 420 | throwWarning: tr("PORTUGAL-Edifício degradado deve ter abandoned:building=yes ou abandoned:shop=yes..."); |
| | 421 | } |
| | 422 | *[/name|description|note|designation/ =~ /(?i)(?u)((Equipamentos?|Materia(is|l)) Hospitalar|instrumentos médicos)/][shop != medical_supply] { |
| | 423 | throwWarning: tr("PORTUGAL-Empresa de venda de material hospitalar deve ter shop=medical_supply"); |
| | 424 | } |
| | 425 | *[/^(name|name:pt)$/ =~ /(?i)(?u)Noiv[ao]s/][shop=clothes][!clothes] { |
| | 426 | throwWarning: tr("PORTUGAL-Loja de roupa para noivas deve ter clothes=wedding"); |
| | 427 | } |
| | 428 | *[/^(name|name:pt|note)$/ =~ /(?i)(?u)\b(Zara Kids|Lanidor J[úu]nior|Roupa (de |para )?Crianças?)\b/][shop=clothes][!clothes] { |
| | 429 | throwWarning: tr("PORTUGAL-Loja de roupa para criança deve ter clothes=children"); |
| | 430 | } |
| | 431 | *[/^(name|name:pt|note)$/ =~ /(?i)(?u)\b(Roupa (de |para )?B[ée]b[ée]s?)\b/][shop=clothes][!clothes] { |
| | 432 | throwWarning: tr("PORTUGAL-Loja de roupa para bebé deve ter clothes=babies"); |
| | 433 | } |
| | 434 | *[/^(name|name:pt)$/ =~ /(?i)(?u)\b(Salsa|Levi's|Levi Strauss|Pepe Jeans|Lee|W52)\b/][shop=clothes][!clothes] { |
| | 435 | throwWarning: tr("PORTUGAL-Loja essencialmente de jeans deve ter clothes=denim"); |
| | 436 | } |
| | 437 | *[/^(name|name:pt)$/ =~ /(?i)(?u)\b(lingerie|women'secret|Calzedonia|Intimissimi|Loja das Meias)\b/][shop=clothes][!clothes] { |
| | 438 | throwWarning: tr("PORTUGAL-Loja de roupa interior,meias,etc. deve ter clothes=underwear"); |
| | 439 | } |
| | 440 | *["addr:country"]["addr:country" !~ /^PT$/] { |
| | 441 | throwWarning: tr("PORTUGAL-O país na morada deve ter o código PT"); |
| | 442 | } |
| | 443 | *[leisure][/^(name|name:pt)$/ =~ /^(?i)(?u)(campo|est(á|a)dio) (de (futebol|desportos?)|desportivo)?$/], |
| | 444 | *[leisure][/^(name|name:pt)$/ =~ /^(?i)(?u)(estádio |Pavilhão )?Gimnodesportivo$/], |
| | 445 | *[leisure=playground][/^(name|name:pt)$/ =~ /^(?i)(?u)Parque Infantil$/], |
| | 446 | *[highway = bus_stop][/^(name|name:pt)$/ =~ /^(?i)(?u)(paragem( d(e|os) autocarros?)|bus stop)?$/], |
| | 447 | *[highway = track][/^(name|name:pt)$/ =~ /^(?i)(?u)Trilhos?$/], |
| | 448 | *[highway = path][/^(name|name:pt)$/ =~ /^(?i)(?u)Trilhos?$/], |
| | 449 | *[highway][/^(name|name:pt)$/ =~ /^(?i)(?u)Estrad[ãa]o( de Terra)?$/], |
| | 450 | *[natural = tree][/^(name|name:pt)$/ =~ /^(?i)(?u)[ÁA]rvores?$/], |
| | 451 | *[amenity = drinking_water][/^(name|name:pt)$/ =~ /^(?i)(?u)(Fonte|Bebedouro)s?$/], |
| | 452 | *[amenity = post_office][/^(name|name:pt)$/ =~ /^(?i)(?u)Correios$/], |
| | 453 | *[amenity = fuel][/^(name|name:pt)$/ =~ /^(?i)(?u)(Estação|Posto|Bombas)(de (Serviço|Combustível|Gasolina))?$/], |
| | 454 | *[amenity = parking][/^(name|name:pt)$/ =~ /^(?i)(?u)(Parque((de )?Estacionamento)?|Estacionamento(( de)? (Carros|Autom[óo]veis)?)?)$/], |
| | 455 | *[amenity = bank][/^(name|name:pt)$/ =~ /^(?i)(?u)Banco$/], |
| | 456 | *[amenity = bench][/^(name|name:pt)$/ =~ /^(?i)(?u)Bancos?$/], |
| | 457 | *[amenity = waste_basket][/^(name|name:pt)$/ =~ /^(?i)(?u)Caixote (d[oe] |para( o)? )?Lixos?$/], |
| | 458 | *[natural = tree][/^(name|name:pt)$/ =~ /^(?i)(?u)[ÁA]rvores?$/], |
| | 459 | *[highway = steps][/^(name|name:pt)$/ =~ /^(?i)(?u)Escadas?$/], |
| | 460 | *[highway = crossing][/^(name|name:pt)$/ =~ /^(?i)(?u)(Passadeira|Zebra)s?$/], |
| | 461 | *[amenity = bench][/^(name|name:pt)$/ =~ /^(?i)(?u)Bancos?$/] { |
| | 462 | throwWarning: tr("PORTUGAL-Nome supérfluo ou incompleto"); |
| | 463 | } |
| | 464 | node[highway=street_lamp][name] { |
| | 465 | throwWarning: tr("PORTUGAL-Poste de Iluminação com nome"); |
| | 466 | } |
| | 467 | *[building][/^(name|name:pt)$/ =~ /^(?i)(?u)(Habita[çc][ãa]o|Casa|Moradia|Vivenda)?$/] { |
| | 468 | throwWarning: tr("PORTUGAL-Nome supérfluo em edifício que deve ter building=house"); |
| | 469 | } |
| | 470 | |
| | 471 | /* Erro comum como Rua do CRuzeiro */ |
| | 472 | *[/^(name|name:pt|addr:street)$/ =~ /[A-Z]{2}[a-z]/] { |
| | 473 | throwWarning: tr("PORTUGAL-Verificar: nome ou endereço com 2 letras seguidas em maiúsculo"); |
| | 474 | } |
| | 475 | /* lugar possui nome que inicia com "Edifício" mas não possui etiqueta building */ |
| | 476 | *[/^(name|name:pt)$/ =~ /^(?i)(?u)edifício/][!building][/^(name|name:pt)$/ !~ /^(?i)(?u)\bEdifício Transparente\b/] { |
| | 477 | throwWarning: tr("PORTUGAL-Possível ausência de etiqueta {0}", "{1.key}"); |
| | 478 | } |
| | 479 | *["addr:postcode"]["addr:postcode" !~ /^[0-9]{4}(-[0-9]{3})?$/], |
| | 480 | *[postal_code][postal_code !~ /^[0-9]{4}(-[0-9]{3})?$/] { |
| | 481 | throwWarning: tr("PORTUGAL-Código postal em formato diferente de NNNN-NNN ou NNNN"); |
| | 482 | } |
| | 483 | node[surface] { |
| | 484 | throwWarning: tr("PORTUGAL-Superfície ({0}) num nó", "{0.key}"); |
| | 485 | } |
| | 486 | /* highway/waterway com layer negativo e sem túnel */ |
| | 487 | *[highway][layer < 0][!tunnel], |
| | 488 | *[waterway][layer < 0][!tunnel] { |
| | 489 | throwWarning: tr("PORTUGAL-Verificar: {0} negativo de {1} com ausência de {2}", "{1.key}", "{0.key}", "{2.key}"); |
| | 490 | } |
| | 491 | /* highway/waterway com layer positivo e sem ponte */ |
| | 492 | *[highway][layer > 0][!bridge][highway != bus_stop], |
| | 493 | *[waterway][layer > 0][!bridge] { |
| | 494 | throwWarning: tr("PORTUGAL-Verificar: {0} positivo de {1} com ausência de {2}", "{1.key}", "{0.key}", "{2.key}"); |
| | 495 | } |
| | 496 | way[highway = motorway_junction] { |
| | 497 | throwError: tr("PORTUGAL- {0} deve ser utilizado apenas no nó de saída da estrada", "{0.tag}"); |
| | 498 | suggestAlternative: "highway=motorway_link"; |
| | 499 | } |
| | 500 | /* estradas de 2 vias mas apenas com 1 faixa estão provavelmente erradas */ |
| | 501 | *[highway][lanes = 1][!oneway?][!junction] { |
| | 502 | throwWarning: tr("PORTUGAL- {0} provavelmente deveria ter {1} ≥ 2 ou {2}=yes", "{0.key}", "{1.key}", "{2.key}"); |
| | 503 | } |
| | 504 | /* admin_level deve ficar na relação e não no nó do local */ |
| | 505 | node[place][admin_level] { |
| | 506 | throwWarning: tr("PORTUGAL- {0} deve fazer parte do limite administrativo e não do nó do local", "{1.key}"); |
| | 507 | } |
| | 508 | relation[admin_level][!boundary], |
| | 509 | relation[admin_level][boundary][boundary != administrative] { |
| | 510 | throwError: tr("PORTUGAL- {0} ausência de boundary=administrative", "{0.key}"); |
| | 511 | } |
| | 512 | relation[boundary=administrative][!admin_level] { |
| | 513 | throwError: tr("PORTUGAL- {0} deve possuir {1}", "{0.tag}", "{1.key}"); |
| | 514 | } |
| | 515 | relation[boundary=administrative] > way { set way_in_relation; } |
| | 516 | relation[admin_level] > way { set way_in_relation; } |
| | 517 | way[boundary=administrative][!admin_level]!.way_in_relation { |
| | 518 | throwError: tr("PORTUGAL- {0} deve possuir {1}", "{0.tag}", "{1.key}"); |
| | 519 | } |
| | 520 | way[admin_level][!boundary]!.way_in_relation, |
| | 521 | way[admin_level][boundary][boundary != administrative]!.way_in_relation { |
| | 522 | throwError: tr("PORTUGAL- {0} ausência de boundary=administrative", "{0.key}"); |
| | 523 | } |
| | 524 | relation[boundary=administrative][type=multipolygon] { |
| | 525 | throwError: tr("PORTUGAL-Relação deve ser do tipo ''type=boundary''"); |
| | 526 | } |
| | 527 | node[destination], |
| | 528 | relation[destination][type != waterway] { |
| | 529 | throwWarning: tr("PORTUGAL- {0} deve-se usar apenas em linhas", "{0.key}"); |
| | 530 | } |
| | 531 | /* landuse não deve ter layer */ |
| | 532 | *[landuse][layer] { |
| | 533 | throwWarning: tr("PORTUGAL-Verificar: {0} não deve ter {1}", "{0.key}", "{1.key}"); |
| | 534 | } |
| | 535 | /* path deve utilizar trail_visibility e não tracktype */ |
| | 536 | way[highway = path][tracktype] { |
| | 537 | throwWarning: tr("PORTUGAL-Uso incorreto de {0}", "{1.key}"); |
| | 538 | suggestAlternative: "trail_visibility"; |
| | 539 | } |
| | 540 | /* tracktype é uma propriedade de tracks apenas */ |
| | 541 | way[highway != track][tracktype] { |
| | 542 | throwWarning: tr("PORTUGAL-Usar {0} apenas em {1}={2}", "{1.key}", "{0.key}", "{0.value}"); |
| | 543 | } |
| | 544 | /* número de saída de rodovia */ |
| | 545 | *[highway=motorway_junction][ref][ref !~ /^[0-9]+( |-)*([A-Z])?$/] { |
| | 546 | throwWarning: tr("PORTUGAL-Saída de via ({0}) fora do padrão", "{1.key}"); |
| | 547 | } |
| | 548 | *[alt_ref] { |
| | 549 | throwWarning: tr("PORTUGAL-O conteúdo de {0} deve fazer parte de ref, separado por ;", "{0.key}"); |
| | 550 | suggestAlternative: "ref"; |
| | 551 | } |
| | 552 | *[/^(name|name:pt)$/ =~ /^(?i)(?u)pra(ç|cet)a/][!leisure][landuse = grass] { |
| | 553 | throwWarning: tr("PORTUGAL-Possível definição errada de praça: {0}", "{2.tag}"); |
| | 554 | suggestAlternative: "leisure=park"; |
| | 555 | } |
| | 556 | /* layer não faz sentido em outros objetos */ |
| | 557 | *[layer][!building][!highway][man_made!=pipeline][!tunnel][!railway][!waterway] { |
| | 558 | throwWarning: tr("PORTUGAL-Verificar: possível uso incorreto de layer no objeto, pode ser andar, etiqueta level"); |
| | 559 | } |
| | 560 | /* https://github.com/OSMBrasil/validador-josm/issues/54 */ |
| | 561 | /* requer JOSM ≥ 7761 */ |
| | 562 | *[tourism = motel][amenity != love_hotel], |
| | 563 | *[/^(name|name:pt)$/ =~ /(?i)(?u)\bmotel\b/][amenity != love_hotel] { |
| | 564 | throwWarning: tr("PORTUGAL-Ausência de etiqueta ''{0}''", "{1.value}"); |
| | 565 | } |
| | 566 | *[amenity = love_hotel][tourism][tourism != motel] { |
| | 567 | throwWarning: tr("PORTUGAL-Verificar: provavelmente deve ser ''{0}={1}''", "{2.key}", "{2.value}"); |
| | 568 | } |
| | 569 | *["building:levels" < 1] { |
| | 570 | throwWarning: tr("PORTUGAL-Verificar: {0} com valor inválido", "{0.key}"); |
| | 571 | } |
| | 572 | /* deve-se utilizar short_name, name ou official_name ao invés de long_name */ |
| | 573 | *[long_name] { |
| | 574 | throwWarning: tr("PORTUGAL-Chave inválida: {0}", "{0.key}"); |
| | 575 | suggestAlternative: "highway=name"; |
| | 576 | suggestAlternative: "highway=short_name"; |
| | 577 | suggestAlternative: "highway=official_name"; |
| | 578 | } |
| | 579 | /* landuse deve conter algum valor que não seja yes */ |
| | 580 | *[landuse?] { |
| | 581 | throwWarning: tr("PORTUGAL-Especificar valor correto para {0} em vez de ''{1}''", "{0.key}", tag("landuse")); |
| | 582 | } |
| | 583 | /* vários valores para source devem estar na mesma chave, separados por ';' */ |
| | 584 | *[alt_source][source] { |
| | 585 | throwWarning: tr("PORTUGAL- {0} deve estar incluído em {1}, separado por '';'' caso necessário", "{0.key}", "{1.key}"); |
| | 586 | } |
| | 587 | *[access = permissive] { |
| | 588 | throwWarning: tr("PORTUGAL-Verificar: {0} usar só em vias privadas com permissão de acesso e não vias públicas", "{0.tag}"); |
| | 589 | } |
| | 590 | *[aeroway][designation =~ /^[A-Z]{4}$/][!icao], |
| | 591 | *[aeroway][ref =~ /^[A-Z]{4}$/][!icao] { |
| | 592 | throwWarning: tr("PORTUGAL- {0} provavelmente deve ser utilizado como {1}", "{1.key}", "{2.key}"); |
| | 593 | } |
| | 594 | *[crossing][!highway][!railway] { |
| | 595 | throwWarning: tr("PORTUGAL- crossing deve ser utilizado com highway=crossing, railway=crossing ou highway=traffic_signals"); |
| | 596 | } |
| | 597 | node[highway =~ /^(give_way|mini_roundabout|stop|turning_circle)$/][name] { |
| | 598 | throwWarning: tr("PORTUGAL-Objeto não deve possuir {0}", "{1.key}"); |
| | 599 | } |
| | 600 | way[highway = give_way], |
| | 601 | way[highway = mini_roundabout], |
| | 602 | way[highway = stop], |
| | 603 | way[highway = turning_circle], |
| | 604 | relation[highway = give_way], |
| | 605 | relation[highway = mini_roundabout], |
| | 606 | relation[highway = stop], |
| | 607 | relation[highway = turning_circle] { |
| | 608 | throwWarning: tr("PORTUGAL- {0} deve ser utilizado apenas em nós", "{0.tag}"); |
| | 609 | } |
| | 610 | /* torres de energia, lombas, câmaras, semáforos etc que não estão ligados a numa via */ |
| | 611 | node:unconnected[power = pole], |
| | 612 | node:unconnected[power = tower], |
| | 613 | node:unconnected[highway = speed_camera] { |
| | 614 | throwWarning: tr("PORTUGAL- {0} deve fazer parte de uma linha e não isolado", "{1.tag}"); |
| | 615 | } |
| | 616 | *[iata = "0"] { |
| | 617 | throwWarning: tr("{0} com valor = {1}", "{0.key}", "{0.value}"); |
| | 618 | } |
| | 619 | /* saídas de estradas devem ter nome e/ou referência */ |
| | 620 | node[highway = motorway_junction][!name][!ref] { |
| | 621 | throwWarning: tr("PORTUGAL- {0} sem pelo menos uma das etiquetas: {1} ou {2}", "{0.value}", "{1.key}", "{2.key}"); |
| | 622 | } |
| | 623 | /* provalvemente o tipo dessas vias não deve ser link */ |
| | 624 | *[highway $= _link][name =~ /(Alameda|Avenida|Rua|Travessa|Viela) /] { |
| | 625 | throwWarning: tr("PORTUGAL-Verificar: via possivelmente errada com {0}", tag("highway")); |
| | 626 | } |
| | 627 | node[noname?] { |
| | 628 | throwWarning: tr("PORTUGAL-Verificar: uso suspeito de {0} num nó", "{0.key}"); |
| | 629 | } |
| | 630 | /* source estranhamente igual o name */ |
| | 631 | *[source = *name] { |
| | 632 | throwWarning: tr("PORTUGAL-Verificar: {0} e {1} são iguais", "{0.key}", "{0.value}"); |
| | 633 | } |
| | 634 | |
| | 635 | *[/^(name|name:pt)$/ =~ /^(?i)(?u)(Junta (de )?Freguesia|Câmara Municipal)/][!highway][amenity!=townhall] { |
| | 636 | throwWarning: tr("PORTUGAL-Juntas de Freguesia e Câmaras Municipais deve ter amenity=townhall"); |
| | 637 | } |
| | 638 | *[vatin][!"ref:vatin"], |
| | 639 | *[nif][!"ref:vatin"], |
| | 640 | *[NIF][!"ref:vatin"], |
| | 641 | *[nipc][!"ref:vatin"], |
| | 642 | *[NIPC][!"ref:vatin"] { |
| | 643 | throwWarning: tr("PORTUGAL-Etiqueta errada para Número de Identificaçáo Fiscal, usar ref:vatin=XXX", "{0.key}", "{1.key}"); |
| | 644 | } |
| | 645 | *["ref:vatin"]["ref:vatin" !~ /^PT[0-9]{9}$/] { |
| | 646 | throwWarning: tr("PORTUGAL-Número de Identificaçáo Fiscal tem de ter o formato PTxxxxxxxxx"); |
| | 647 | } |
| | 648 | *["phone:pt"][!phone] { |
| | 649 | throwWarning: tr("PORTUGAL-Chave de etiqueta mal aplicada phone:pt sem haver etiqueta phone"); |
| | 650 | } |
| | 651 | node[layer < 0][amenity=parking] { |
| | 652 | throwWarning: tr("PORTUGAL-provavelmente é uma entrada/saída parque estac.subterrâneo, usar amenity=parking_entrance e parking=underground"); |
| | 653 | } |
| | 654 | node[layer > 0][amenity=parking] { |
| | 655 | throwWarning: tr("PORTUGAL-provavelmente é uma entrada/saída parque estac.no topo de 1 edifício, usar amenity=parking_entrance e parking=rooftop"); |
| | 656 | } |
| | 657 | node:unconnected[amenity=parking_entrance] { |
| | 658 | throwWarning: tr("PORTUGAL-Nós de entradas ou saídas de parque estac. devem estar ligados a 1 estrada"); |
| | 659 | } |
| | 660 | *[tourism][tourism != attraction][layer], |
| | 661 | *[shop][layer], |
| | 662 | *[amenity][amenity != place_of_worship][parking !~ /underground|rooftop/][building!=roof][layer], |
| | 663 | *[craft][layer], |
| | 664 | *[office][layer], |
| | 665 | *[leisure][layer], |
| | 666 | *[man_made][man_made !~ /surveillance|pipeline/][layer], |
| | 667 | *[natural][layer], |
| | 668 | *[sport][layer], |
| | 669 | *[military][layer], |
| | 670 | *["building:part"][layer], |
| | 671 | *[historic][historic !~ /(monument|city_gate)/][layer], |
| | 672 | *[landuse][layer] { |
| | 673 | throwWarning: tr("PORTUGAL-provavelmente layer devia ser level - nº de andar ou não ter layer"); |
| | 674 | } |
| | 675 | *[natural][shop] { |
| | 676 | throwWarning: tr("PORTUGAL-natural junto com shop"); |
| | 677 | } |
| | 678 | *[/name|brand|operator/ =~ /\b(5 (à s|[áa]\s[Ss])ec)\b/] { |
| | 679 | throwWarning: tr("PORTUGAL-O correto é 5 à Sec"); |
| | 680 | } |
| | 681 | *[amenity=fuel][!brand][name =~ /^(?i)(?u)(Agip|BP|Cepsa|Esso|Exxon|Galp|Mobil|Repsol|Shell|Total)?$/] { |
| | 682 | throwWarning: tr("PORTUGAL-Marca de combustível deve estar em brand e não name. O posto costuma ser de privados e com nome extenso "); |
| | 683 | } |
| | 684 | *[/name|brand|operator/ =~ /\b(galp|GALP)\b/] { |
| | 685 | throwWarning: tr("PORTUGAL-O correto é Galp e não GALP ou galp"); |
| | 686 | } |
| | 687 | *[/name|brand|operator/ =~ /\b(CEPSA|cepsa)\b/] { |
| | 688 | throwWarning: tr("PORTUGAL-O correto é Cepsa e não CEPSA ou cepsa"); |
| | 689 | } |
| | 690 | *[/name|brand|operator/ =~ /\b(ESSO|esso)\b/] { |
| | 691 | throwWarning: tr("PORTUGAL-O correto é Esso e não ESSO ou esso"); |
| | 692 | } |
| | 693 | *[/name|brand|operator/ =~ /\b(EXX?ON|exx?on)\b/] { |
| | 694 | throwWarning: tr("PORTUGAL-O correto é Exxon e não EXXON ou exxon"); |
| | 695 | } |
| | 696 | *[/name|brand|operator/ =~ /\b(REPSOL|repsol)\b/] { |
| | 697 | throwWarning: tr("PORTUGAL-O correto é Repsol e não REPSOL ou repsol"); |
| | 698 | } |
| | 699 | *[/name|brand|operator/ =~ /\b(SHELL?|shell?)\b/] { |
| | 700 | throwWarning: tr("PORTUGAL-O correto é Shell e não SHELL ou shell"); |
| | 701 | } |
| | 702 | *[amenity=fuel][/name|brand|operator/ =~ /\b(TOTAL|total)\b/] { |
| | 703 | throwWarning: tr("PORTUGAL-O correto é Total e não TOTAL ou total"); |
| | 704 | } |
| | 705 | *[amenity=fuel][/name|brand|operator/ =~ /\bMul?ti(\s?[óÓ]p?|\s?[ÓO]|\sOp?)ticas?\b/] { |
| | 706 | throwWarning: tr("PORTUGAL-O correto é MultiOpticas"); |
| | 707 | } |
| | 708 | *[amenity=fuel][/name|brand|operator/ =~ /\b(L[ÍI]DE?L|l[íi]de?l|Líde?l)[Ee]?\b/] { |
| | 709 | throwWarning: tr("PORTUGAL-O correto é Lidl"); |
| | 710 | } |
| | 711 | *[name][name =~ /\b(L[ÍI]DE?L|l[íi]de?l|Líde?l)[Ee]?\b/] { |
| | 712 | throwWarning: tr("PORTUGAL-O correto é Lidl"); |
| | 713 | } |
| | 714 | *[wikipedia][wikipedia !~ /^pt:/] { |
| | 715 | throwWarning: tr("PORTUGAL-Usar prefixo em português (pt:) em {0}", "{0.key}"); |
| | 716 | } |
| | 717 | area[/natural|landuse/] > node { set .area_ligada_via } |
| | 718 | way[highway][highway != pedestrian][!barrier] > node.area_ligada_via, |
| | 719 | way[railway] > node.area_ligada_via { |
| | 720 | throwWarning: tr("PORTUGAL-Não é recomendável ter áreas de landuse ou natural ligados a estradas, rios ou ferrovias"); |
| | 721 | } |
| | 722 | way[man_made=pipeline] > node { set .is_in_pipeline } |
| | 723 | way[highway] > node.is_in_pipeline, |
| | 724 | way[railway] > node.is_in_pipeline { |
| | 725 | throwWarning: tr("PORTUGAL-Pipeline não deve estar ligado a estradas ou ferrovias"); |
| | 726 | } |
| | 727 | /* utilizar ; como separador de valores em source */ |
| | 728 | *[source =~ /,/], |
| | 729 | *["source:ref" =~ /,/], |
| | 730 | *["source:name" =~ /,/] { |
| | 731 | throwOther: tr("utilizar ; como separador de valores em {0}", "{0.key}"); |
| | 732 | } |
| | 733 | *[/^(name|name:pt)$/ =~ /(?i)(?u)Posto (de )?Turismo/][name][information != office][!highway][/^(name|name:pt)$/ !~ /(?i)(?u)\b(Parque|Estacionamento)\b/] { |
| | 734 | throwWarning: tr("PORTUGAL-Posto de Turismo deve ter information=office e tourism=information"); |
| | 735 | } |
| | 736 | *[capacity=0] { |
| | 737 | throwWarning: tr("PORTUGAL-Valor provavelmente errado de capacity=0"); |
| | 738 | } |
| | 739 | *[ele][ele !~ /^[1-9][0-9]?[0-9]?[0-9]?(\.[0-9][0-9]?[0-9]?)?$/], |
| | 740 | *[ele > 2351], |
| | 741 | *[ele < 0] { |
| | 742 | throwWarning: tr("PORTUGAL-ele tem de ser um número em metros e sem unidade de medida entre 0 e 2351 em Portugal"); |
| | 743 | } |
| | 744 | area[name =~ /^(?i)(?u)Adro/][name][landuse != churchyard][!railway][!boundary][!place] { |
| | 745 | throwWarning: tr("PORTUGAL-Adro de igreja deve ter landuse=churchyard"); |
| | 746 | } |
| | 747 | *[/^(name|name:pt)$/ =~ /^(?i)(?u)Cruzeiro/][name][historic != wayside_cross][!railway][!highway][!boundary][!place][!shop][!amenity] { |
| | 748 | throwWarning: tr("PORTUGAL-Cruzeiro ou cruz em zonas urbanas deve ter historic=wayside_cross"); |
| | 749 | } |
| | 750 | *["addr:housenumber" =~ /^(?i)(?u)n\.?º?/] { |
| | 751 | throwWarning: tr("PORTUGAL-addr:housenumber não deve ter NºX, apenas o número de porta"); |
| | 752 | } |
| | 753 | *[building][ele][ele =~ /^[1-3]?[0-9]$/] { |
| | 754 | throwWarning: tr("PORTUGAL-Verificar: edifício com etiqueta ele com valores que parecem nº de andares, pode ser building:levels"); |
| | 755 | } |
| | 756 | *[religion=christian][denomination=catholic][!route] { |
| | 757 | throwWarning: tr("PORTUGAL-Locais de oração cristãos devem ter denomination=roman_catholic e não a genérica denomination=catholic"); |
| | 758 | } |
| | 759 | *[name][name =~ /^(?i)(?u)Depósito de Água/][man_made][man_made != water_tower][!railway][!highway][!boundary][!place][!shop][!amenity] { |
| | 760 | throwWarning: tr("PORTUGAL-Depósito de água deve ter man_made=water_tower"); |
| | 761 | } |
| | 762 | *[name][name =~ /^(?i)(?u)Estádio/][leisure][leisure != stadium] { |
| | 763 | throwWarning: tr("PORTUGAL-Estádio deve ter leisure=stadium"); |
| | 764 | } |
| | 765 | *[name][name =~ /^".*"$/] { |
| | 766 | throwWarning: tr("PORTUGAL-Nome que começa e termina com aspas, não são necessárias aspas para marcas ou nomes"); |
| | 767 | } |
| | 768 | *[/^(name|name:pt|note|description)$/ =~ /(?i)(?u)Oliveiras?/][natural=tree][!genus], |
| | 769 | *[/^(name|name:pt|note|description)$/ =~ /(?i)(?u)Oliveiras?/][natural=tree][!leaf_cycle] { |
| | 770 | throwWarning: tr("PORTUGAL-Oliveira deve ter genus=Olea e leaf_cycle=evergreen, retirar nome"); |
| | 771 | } |
| | 772 | *[/^(name|name:pt|note|description)$/ =~ /(?i)(?u)Plátanos?/][natural=tree][!genus], |
| | 773 | *[/^(name|name:pt|note|description)$/ =~ /(?i)(?u)Plátanos?/][natural=tree][!leaf_cycle], |
| | 774 | *[/^(name|name:pt|note|description)$/ =~ /(?i)(?u)Plátanos?/][natural=tree][!leaf_type] { |
| | 775 | throwWarning: tr("PORTUGAL-Plátano deve ter genus=Platanus, leaf_cycle=deciduous e leaf_type=broadleaved, retirar nome"); |
| | 776 | } |
| | 777 | *[/^(name|name:pt|note|description)$/ =~ /(?i)(?u)Pinheiros?/][natural=tree][!genus], |
| | 778 | *[/^(name|name:pt|note|description)$/ =~ /(?i)(?u)Pinheiros?/][natural=tree][!leaf_cycle], |
| | 779 | *[/^(name|name:pt|note|description)$/ =~ /(?i)(?u)Pinheiros?/][natural=tree][!leaf_type] { |
| | 780 | throwWarning: tr("PORTUGAL-Pinheiro deve ter genus=Pinus, leaf_cycle=evergreen e leaf_type=needleleaved, retirar nome"); |
| | 781 | } |
| | 782 | node[addr:housenumber] ∈ *[building][addr:housenumber] { |
| | 783 | throwWarning: tr("PORTUGAL-Nó com addr:housenumber dentro de edifício com addr:housenumber"); |
| | 784 | } |
| | 785 | *["addr:housenumber"]["addr:housenumber" =~ /^(\+351)?\s?[0-9]{3}\s?[0-9]{3}[0-9]{3}((;\s?\+351\s?[0-9]{3}\s?[0-9]{3}[0-9]{3})?)+$/] { |
| | 786 | throwWarning: tr("PORTUGAL-addr:housenumber com nº de telefone em vez de nº de porta"); |
| | 787 | } |
| | 788 | *["addr:housenumber"]["addr:housenumber" =~ /(\\|-|,|\.|\/)/] { |
| | 789 | throwWarning: tr("PORTUGAL-Os nº em addr:housenumber devem ser separados por ponto e vírgula apenas"); |
| | 790 | } |
| | 791 | *[name][name =~ /^(?i)(?u)((isto é Um )?Teste|(Para |A )?Testar|Experiência)$/] { |
| | 792 | throwWarning: tr("PORTUGAL-Verificar: nome Teste"); |
| | 793 | } |
| | 794 | *[!ref][name][name =~ /^(E(\.|\s)?[NRM]|C(\.|\s)?M)(\.|\s)?[1-9]/] { |
| | 795 | throwWarning: tr("PORTUGAL-name c/ referência da estrada mas sem ref, passar name para ref"); |
| | 796 | } |
| | 797 | *[!ref]["name:pt"]["name:pt" =~ /^(E(\.|\s)?[NRM]|C(\.|\s)?M)(\.|\s)?[1-9]/] { |
| | 798 | throwWarning: tr("PORTUGAL-name:pt c/ referência da estrada mas sem ref, passar name:pt para ref"); |
| | 799 | } |