Changeset 73293ef in osmose-backend


Ignore:
Timestamp:
Jul 26, 2014 12:35:57 PM (5 years ago)
Author:
Frédéric Rodrigo <fred.rodrigo@…>
Branches:
master
Children:
b324b08
Parents:
a46a292
git-author:
Frédéric Rodrigo <fred.rodrigo@…> (23/07/2014 23:40:33)
git-committer:
Frédéric Rodrigo <fred.rodrigo@…> (26/07/2014 12:35:57)
Message:

Take care of addr:place in addition of addr:street into analyser_osmosis_relation_associatedStreet

File:
1 edited

Legend:

Unmodified
Added
Removed
  • analysers/analyser_osmosis_relation_associatedStreet.py

    r6b1955a r73293ef  
    4040    ways.tags?'addr:housenumber' AND 
    4141    (NOT ways.tags?'addr:street') AND 
     42    (NOT ways.tags?'addr:place') AND 
    4243    relations.id IS NULL 
    4344; 
     
    6162    nodes.tags?'addr:housenumber' AND 
    6263    (NOT nodes.tags?'addr:street') AND 
     64    (NOT nodes.tags?'addr:place') AND 
    6365    relations.id IS NULL 
    6466; 
     
    196198    ST_Transform(geom, {0}) AS geom, 
    197199    nodes.tags->'addr:housenumber' AS number, 
    198     nodes.tags->'addr:street' AS street 
     200    coalesce(nodes.tags->'addr:street', nodes.tags->'addr:place') AS street 
    199201FROM 
    200202    nodes 
     
    206208    relation_members IS NULL AND 
    207209    nodes.tags?'addr:housenumber' AND 
    208     nodes.tags?'addr:street' 
     210    (nodes.tags?'addr:street' OR nodes.tags?'addr:place') 
    209211) UNION ( 
    210212SELECT 
     
    213215    ST_Transform(ST_Centroid(linestring), {0}) AS geom, 
    214216    ways.tags->'addr:housenumber' AS number, 
    215     ways.tags->'addr:street' AS street 
     217    coalesce(ways.tags->'addr:street', ways.tags->'addr:place') AS street 
    216218FROM 
    217219    ways 
     
    224226    relation_members IS NULL AND 
    225227    ways.tags?'addr:housenumber' AND 
    226     ways.tags?'addr:street' 
     228    (ways.tags?'addr:street' OR ways.tags?'addr:place') 
    227229) UNION ( 
    228230SELECT 
     
    245247WHERE 
    246248    nodes.tags?'addr:housenumber' AND 
    247     nodes.tags?'addr:street' 
     249    (nodes.tags?'addr:street' OR nodes.tags?'addr:place') 
    248250) UNION ( 
    249251SELECT 
     
    267269    ST_NPoints(linestring) > 1 AND 
    268270    ways.tags?'addr:housenumber' AND 
    269     ways.tags?'addr:street' 
     271    (ways.tags?'addr:street' OR ways.tags?'addr:place') 
    270272) 
    271273""" 
     
    514516    def __init__(self, config, logger = None): 
    515517        Analyser_Osmosis.__init__(self, config, logger) 
    516         self.classs[1] = {"item":"2060", "level": 3, "tag": ["addr", "relation", "fix:chair"], "desc": T_(u"addr:housenumber without addr:street must be in a associatedStreet relation") } 
     518        self.classs[1] = {"item":"2060", "level": 3, "tag": ["addr", "relation", "fix:chair"], "desc": T_(u"addr:housenumber without addr:street or addr:place must be in a associatedStreet relation") } 
    517519        self.classs_change[2] = {"item":"2060", "level": 2, "tag": ["addr", "relation", "fix:chair"], "desc": T_(u"No street role") } 
    518520        self.classs_change[3] = {"item":"2060", "level": 2, "tag": ["addr", "fix:chair"], "desc": T_(u"street role is not an highway") } 
Note: See TracChangeset for help on using the changeset viewer.