def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     highway_values = ("motorway", "trunk", "primary", "secondary")
     if self.config.options and "osmosis_way_approximate" in self.config.options and self.config.options[
             "osmosis_way_approximate"].get("highway"):
         highway_values = self.config.options[
             "osmosis_way_approximate"].get("highway")
     self.tags = (
         (10, "railway", ("rail", )),
         (20, "waterway", ("river", )),
         (30, "highway", highway_values),
     )
     for t in self.tags:
         self.classs_change[t[0]] = {
             "item": "1190",
             "level": 3,
             "tag": ["geom", "highway", "railway", "fix:imagery"],
             "desc": T_(u"Approximate %s", t[1])
         }
     self.callback10 = lambda res: {
         "class": res[4],
         "subclass": self.stablehash(res[3]),
         "data": [self.way_full, self.positionAsText],
         "text": {
             "en": u"%s discart from %sm" % (res[3], res[2]),
             "es": u"%s de %sm descartados" % (res[3], res[2]),
             "fr": u"Flèche de %sm sur %s" % (res[2], res[3])
         }
     }
示例#2
0
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs_change[1] = {
         "item": "3210",
         "level": 2,
         "tag": ["highway", "tag", "fix:chair"],
         "desc": T_(u"noexit on node with exit")
     }
     self.classs[2] = {
         "item": "3210",
         "level": 2,
         "tag": ["highway", "tag", "fix:chair"],
         "desc": T_(u"noexit on way with multiple exits")
     }
     self.callback10 = lambda res: {
         "class": 1,
         "subclass": 1 if res[2] else 2,
         "data": [self.node_full, self.positionAsText],
         "fix": {
             "-": ["noexit"]
         }
     }
     self.callback20 = lambda res: {
         "class": 2,
         "data": [self.way_full, self.positionAsText],
         "fix": {
             "-": ["noexit"]
         }
     }
示例#3
0
    def __init__(self, config, logger, source = Source(), load = Load(), mapping = Mapping()):
        Analyser_Osmosis.__init__(self, config, logger)
        self.source = source
        self.load = load
        self.mapping = mapping

        if hasattr(self, 'missing_official'):
            self.classs[self.missing_official["class"]] = self.missing_official
        else:
            self.missing_official = None
        if hasattr(self, 'missing_osm'):
            self.classs[self.missing_osm["class"]] = self.missing_osm
        else:
            self.missing_osm = None
        if hasattr(self, 'possible_merge'):
            self.classs[self.possible_merge["class"]] = self.possible_merge
        else:
            self.possible_merge = None
        if hasattr(self, 'moved_official'):
            self.classs[self.moved_official["class"]] = self.moved_official
        else:
            self.moved_official = None
        if hasattr(self, 'update_official'):
            self.classs[self.update_official["class"]] = self.update_official
        else:
            self.update_official = None
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs_change[1] = {
         "item": 2090,
         "level": 3,
         "tag": ["tag", "highway", "fix:imagery"],
         "desc": T_(u"Possible crossing=traffic_signals")
     }
     self.classs[2] = {
         "item": 2090,
         "level": 2,
         "tag": ["tag", "highway", "fix:imagery"],
         "desc": T_(u"Possible missing highway=traffic_signals nearby")
     }
     self.callback10 = lambda res: {
         "class":
         1,
         "data": [self.node_full, self.node_full, self.positionAsText],
         "fix": [[{
             "+": {
                 "crossing": "traffic_signals"
             }
         }], [{
             "+": {
                 "crossing": "traffic_signals"
             }
         }, {
             "-": ["crossing"]
         }]]
     }
     self.callback20 = lambda res: {
         "class": 2,
         "data": [self.node_full, self.positionAsText]
     }
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs_change[1] = {
         "item": "1040",
         "level": 1,
         "tag": ["geom", "fix:chair"],
         "desc": T_(u"Invalid polygon")
     }
     self.classs_change[2] = {
         "item": "1040",
         "level": 1,
         "tag": ["geom", "fix:chair"],
         "desc": T_(u"Invalid multipolygon")
     }
     self.callback10 = lambda res: {
         "class": 1,
         "data": [self.way_full, self.positionAsText],
         "text": {
             "en": res[2]
         }
     }
     self.callback20 = lambda res: {
         "class": 2,
         "data": [self.relation, self.positionAsText],
         "text": {
             "en": res[2]
         }
     }
示例#6
0
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs_change[1] = {
         "item": "1210",
         "level": 1,
         "tag": ["highway", "cycleway", "fix:chair"],
         "desc": T_(u"Unconnected cycleway")
     }
     self.classs_change[2] = {
         "item": "1210",
         "level": 1,
         "tag": ["highway", "fix:chair"],
         "desc": T_(u"Unconnected way")
     }
     self.classs[3] = {
         "item":
         "1210",
         "level":
         1,
         "tag": ["highway", "fix:chair"],
         "desc":
         T_(u"One way inaccessible or missing parking or parking entrance")
     }
     self.callback20 = lambda res: {
         "class": 1 if res[2] == 'cycleway' else 2,
         "data": [self.way_full, self.positionAsText]
     }
 def __init__(self, config, logger = None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs_change[1] = {"item": 2090, "level": 3, "tag": ["tag", "highway", "fix:imagery"], "desc": T_(u"Possible crossing=traffic_signals") }
     self.callback10 = lambda res: {"class":1, "data":[self.node_full, self.node_full, self.positionAsText], "fix":[
         [{"+":{"crossing":"traffic_signals"}}],
         [{"+":{"crossing":"traffic_signals"}}, {"-":["crossing"]}]
     ] }
 def __init__(self, config, logger = None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs[1] = {"item":"7090", "level": 2, "tag": ["railway", "highway", "fix:imagery"], "desc": T_(u"Missing way on level crossing") }
     self.classs[3] = {"item":"7090", "level": 2, "tag": ["highway", "fix:chair"], "desc": T_(u"Lone highway or barrier node") }
     self.callback10 = lambda res: {"class":1, "subclass":1, "data":[self.node_full, self.positionAsText, self.way_full]}
     self.callback20 = lambda res: {"class":1, "subclass":2, "data":[self.node_full, self.positionAsText, self.way_full]}
     self.callback30 = lambda res: {"class":3, "data":[self.node_full, self.positionAsText]}
    def __init__(self, config, logger = None):
        Analyser_Osmosis.__init__(self, config, logger)

        # Check langues for country are writen with alphabets
        self.alphabet = 'language' in config.options and languages.languages_are_alphabets(config.options['language'])
        if self.alphabet:
            self.classs[1] = {"item":"5050", "level": 2, "tag": ["name", "fix:survey"], "desc": T_(u"Soundex test") } # FIXME "menu":"test soundex"
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs[1] = {
         "item": "3010",
         "level": 2,
         "tag": ["highway", "roundabout", "fix:chair"],
         "desc": T_(u"Wrong highway on roundabout")
     }
     self.classs[2] = {
         "item": "2030",
         "level": 2,
         "tag": ["highway", "roundabout", "fix:chair"],
         "desc": T_(u"Missing oneway")
     }
     self.classs[3] = {
         "item": "3010",
         "level": 2,
         "tag": ["highway", "roundabout", "fix:imagery"],
         "desc": T_(u"Roundabout shortcut")
     }
     self.classs[4] = {
         "item": "3010",
         "level": 2,
         "tag": ["highway", "roundabout", "fix:chair"],
         "desc": T_(u"Roundabout crossing")
     }
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs[11] = {
         "item": "2060",
         "level": 3,
         "tag": ["addr", "fix:chair"],
         "desc": T_(u"Multiple name for the same ref FANTOIR"),
     }
 def __init__(self, config, logger = None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs_change[1] = {"item":"1140", "level": 3, "tag": ["fix:chair"], "desc": T_(u"Missing tag or role on node") }
     self.classs_change[2] = {"item":"1140", "level": 3, "tag": ["fix:chair"], "desc": T_(u"Missing tag or role on way") }
     self.classs_change[3] = {"item":"1140", "level": 3, "tag": ["fix:chair"], "desc": T_(u"Missing tag or role on relation") }
     self.callback10 = lambda res: {"class":1, "data":[self.node_full, self.relation_full, self.positionAsText]}
     self.callback20 = lambda res: {"class":2, "data":[self.way_full, self.relation_full if res[1] else None, self.positionAsText]}
     self.callback30 = lambda res: {"class":3, "data":[self.relation_full, self.relation_full if res[1] else None, self.positionAsText]}
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs[1] = {
         "item": "1080",
         "level": 1,
         "tag": ["geom", "building", "fix:chair"],
         "desc": T_(u"Orphan nodes cluster")
     }
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs[1] = {
         "item": "1160",
         "level": 1,
         "tag": ["relation", "geom", "fix:chair"],
         "desc": T_(u"Large relation")
     }
示例#15
0
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs[1] = {
         "item": "6060",
         "level": 2,
         "tag": ["boundary", "geom", "fix:chair"],
         "desc": T_(u"Hole between administrative boundaries")
     }
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs[1] = {
         "item": "4130",
         "level": 3,
         "tag": ["fix:chair"],
         "desc": T_(u"Duplicate wikipedia tag")
     }
示例#17
0
 def __init__(self, config, logger = None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs_change[1] = {"item":"1050", "level": 1, "tag": ["highway", "roundabout", "fix:chair"], "desc": T_(u"Reverse roundabout") } # FIXME "menu":"rond-point à l'envers", "menu":"reverse roundabout"
     self.callback10 = lambda res: {"class":1, "data":[self.way_full, self.positionAsText]}
     if self.config.options.get("driving_side") == "left":
         self.driving_side = "NOT "
     else:
         self.driving_side = ""
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs[1] = {
         "item": "3080",
         "level": 3,
         "tag": ["tag", "fix:imagery"],
         "desc": T_(u"Swimming-pool, reservoir, pond as natural=water")
     }
 def __init__(self, config, logger = None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs_change[1] = {"item":"1050", "level": 1, "tag": ["highway", "roundabout", "fix:chair"], "desc": T_(u"Reverse roundabout") } # FIXME "menu":"rond-point à l'envers", "menu":"reverse roundabout"
     self.callback10 = lambda res: {"class":1, "data":[self.way_full, self.positionAsText]}
     if self.config.options.get("driving_side") == "left":
         self.driving_side = "NOT "
     else:
         self.driving_side = ""
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs[11] = {
         "item": "2060",
         "level": 3,
         "tag": ["addr", "fix:chair"],
         "desc": T_(u"Multiple name for the same ref FANTOIR")
     }
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs[1] = {
         "item": "5050",
         "level": 2,
         "tag": ["name", "fix:survey"],
         "desc": T_(u"Soundex test")
     }  # FIXME "menu":"test soundex"
 def __init__(self, config, logger = None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs[1] = {"item": "1260", "level": 3, "tag": ["public_transport"], "desc": T_(u"Route in parts") }
     self.classs[2] = {"item": "1260", "level": 3, "tag": ["public_transport"], "desc": T_(u"Stop or platform away from route way") }
     self.classs_change[3] = {"item": "1260", "level": 3, "tag": ["public_transport"], "desc": T_(u"Non route relation member in route_master relation") }
     self.callback10 = lambda res: {"class":1, "data":[self.relation_full, self.positionAsText]}
     self.callback20 = lambda res: {"class":2, "data":[self.relation_full, self.any_full, self.positionAsText]}
     self.callback30 = lambda res: {"class":3, "data":[self.relation_full, self.any_full, self.positionAsText]}
示例#23
0
 def __init__(self, config, logger = None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs_change[1] = {"item":"1140", "level": 3, "tag": ["fix:chair"], "desc": T_(u"Missing tag or role on node") }
     self.classs_change[2] = {"item":"1140", "level": 3, "tag": ["fix:chair"], "desc": T_(u"Missing tag or role on way") }
     self.classs_change[3] = {"item":"1140", "level": 3, "tag": ["fix:chair"], "desc": T_(u"Missing tag or role on relation") }
     self.callback10 = lambda res: {"class":1, "data":[self.node_full, self.relation_full, self.positionAsText]}
     self.callback20 = lambda res: {"class":2, "data":[self.way_full, self.relation_full if res[1] else None, self.positionAsText]}
     self.callback30 = lambda res: {"class":3, "data":[self.relation_full, self.relation_full if res[1] else None, self.positionAsText]}
示例#24
0
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs[1] = {
         "item": "3150",
         "level": 1,
         "tag": ["tag", "fix:chair"],
         "desc": T_(u"Typo in tag")
     }
示例#25
0
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs[1] = {
         "item": "1080",
         "level": 1,
         "tag": ["geom", "building", "fix:chair"],
         "desc": T_(u"Orphan nodes cluster")
     }
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs_change[1] = {
         "item": "0",
         "level": 3,
         "tag": ["building", "fix:imagery"],
         "desc": T_(u"Merge building (triangle)")
     }
     self.callback70 = lambda res: {"class":1, "data":[self.way_full, self.positionAsText]}
 def __init__(self, config, logger = None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.tags = ( (10, "railway", ("rail",)),
                   (20, "waterway", ("river",)),
                   (30, "highway", ("motorway", "trunk", "primary", "secondary")),
                 )
     for t in self.tags:
         self.classs_change[t[0]] = {"item":"1190", "level": 3, "tag": ["geom", "highway", "railway", "fix:imagery"], "desc": T_(u"Approximate %s", t[1]) }
     self.callback10 = lambda res: {"class":res[4], "subclass":abs(int(hash(res[3]))), "data":[self.way_full, self.positionAsText], "text": {"en": u"%s discart from %sm" % (res[3], res[2]), "es": u"%s de %sm descartados" % (res[3], res[2]), "fr": u"Flèche de %sm sur %s" % (res[2], res[3])}}
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs_change[1] = {
         "item": 3180,
         "level": 2,
         "tag": ["relation", "restriction", "fix:survey"],
         "desc": T_(u"Restriction relation, wrong number of members")
     }
     self.classs_change[2] = {
         "item": 3180,
         "level": 2,
         "tag": ["relation", "restriction", "fix:chair"],
         "desc": T_(u"Restriction relation, bad member type")
     }
     self.classs_change[3] = {
         "item": 3180,
         "level": 2,
         "tag": ["relation", "restriction", "fix:chair"],
         "desc": T_(u"Unconnected restriction relation ways")
     }
     self.classs_change[4] = {
         "item":
         3180,
         "level":
         2,
         "tag": ["relation", "restriction", "fix:survey"],
         "desc":
         T_(u"Restriction relation, bad oneway direction on \"from\" member"
            )
     }
     self.classs_change[5] = {
         "item": 3180,
         "level": 2,
         "tag": ["relation", "restriction", "fix:survey"],
         "desc": T_(u"Restriction doesn't match topology")
     }
     self.callback10 = lambda res: {
         "class": 1,
         "data": [self.relation_full, self.positionAsText]
     }
     self.callback20 = lambda res: {
         "class": 2,
         "data": [self.relation_full, self.way_full, self.positionAsText]
     }
     self.callback30 = lambda res: {
         "class": 3,
         "data": [self.relation_full, self.positionAsText]
     }
     self.callback40 = lambda res: {
         "class": 4,
         "data": [self.relation_full, self.way_full, self.positionAsText]
     }
     self.callback50 = lambda res: {
         "class": 5,
         "data": [self.relation_full, self.positionAsText]
     }
示例#29
0
 def __init__(self, config, logger = None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs[1] = {"item":"1230", "level": 1, "tag": ["geom", "fix:chair"], "desc": T_(u"Duplicated way geometry and tags") }
     self.classs[2] = {"item":"1230", "level": 2, "tag": ["geom", "fix:chair"], "desc": T_(u"Duplicated way geometry but different tags") }
     self.classs[3] = {"item":"1230", "level": 1, "tag": ["geom", "fix:chair"], "desc": T_(u"Duplicated node geometry and tags") }
     self.classs[4] = {"item":"1230", "level": 2, "tag": ["geom", "fix:chair"], "desc": T_(u"Duplicated node geometry but different tags") }
     self.classs[5] = {"item":"1230", "level": 3, "tag": ["geom", "fix:chair"], "desc": T_(u"Duplicated node without tag") }
     self.callback10 = lambda res: {"class":1, "data":[self.way, self.way, self.positionAsText]}
     self.callback20 = lambda res: {"class":1 if res[3] else 2, "data":[self.way_full, self.way_full, self.positionAsText]}
     self.callback30 = lambda res: {"class":3 if res[3] else 4, "data":[self.node_full, self.node_full, self.positionAsText]}
 def __init__(self, config, logger = None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs[1] = {"item":"7040", "level": 3, "tag": ["power", "fix:imagery"], "desc": T_(u"Lone power tower or pole") }
     self.classs[2] = {"item":"7040", "level": 2, "tag": ["power", "fix:imagery"], "desc": T_(u"Unfinished power line") }
     self.classs[3] = {"item":"7040", "level": 3, "tag": ["power", "fix:chair"], "desc": T_(u"Connection between different voltages") }
     self.classs_change[4] = {"item":"7040", "level": 3, "tag": ["power", "fix:imagery"], "desc": T_(u"Non power node on power way") }
     self.classs_change[5] = {"item":"7040", "level": 3, "tag": ["power", "fix:imagery"], "desc": T_(u"Missing power tower or pole") }
     self.callback20 = lambda res: {"class":2, "data":[self.node_full, self.positionAsText]}
     self.callback40 = lambda res: {"class":4, "data":[self.node_full, self.positionAsText]}
     self.callback50 = lambda res: {"class":5, "data":[self.way_full, self.positionAsText]}
 def __init__(self, config, logger = None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs_change[1] = {"item":"1070", "level": 2, "tag": ["highway", "building", "geom", "fix:imagery"], "desc": T_(u"Highway intersecting building") }
     self.classs_change[2] = {"item":"1070", "level": 2, "tag": ["tree", "building", "geom", "fix:imagery"], "desc": T_(u"Tree intersecting building") }
     self.classs_change[3] = {"item":"1070", "level": 2, "tag": ["highway", "tree", "geom", "fix:imagery"], "desc": T_(u"Tree and highway too close") }
     self.classs_change[4] = {"item":"1070", "level": 3, "tag": ["highway", "waterway", "geom", "fix:imagery"], "desc": T_(u"Highway intersecting water") }
     self.callback10 = lambda res: {"class":1, "data":[self.way_full, self.way_full, self.positionAsText]}
     self.callback20 = lambda res: {"class":2, "data":[self.node_full, self.way_full, self.positionAsText]}
     self.callback30 = lambda res: {"class":3, "data":[self.node_full, self.way_full, self.positionAsText]}
     self.callback40 = lambda res: {"class":4, "data":[self.way_full, self.way_full, self.positionAsText]}
 def __init__(self, config, logger = None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs[100] = {"item":"6070", "level": 3, "tag": ["boundary", "geom", "fix:chair"], "desc": T_(u"Survey point out of boundary") }
     self.classs[101] = {"item":"6070", "level": 1, "tag": ["boundary", "place", "fix:chair"], "desc": T_(u"\"place\" node  out of boundary") }
     self.classs[2] = {"item":"6060", "level": 1, "tag": ["boundary", "geom", "fix:chair"], "desc": T_(u"Boundary intersection") }
     self.classs_change[3] = {"item":"6060", "level": 2, "tag": ["boundary", "geom", "fix:chair"], "desc": T_(u"Lone boundary fragment") }
     self.callback20 = lambda res: {"class":100, "data":[self.relation_full, self.relation_full, self.positionAsText]}
     self.callback30 = lambda res: {"class":101, "data":[self.node_full, self.relation_full, self.positionAsText]}
     self.callback40 = lambda res: {"class":2, "data":[self.relation_full, self.relation_full, self.positionAsText]}
     self.callback50 = lambda res: {"class":3, "data":[self.way_full, self.positionAsText]}
示例#33
0
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs[1] = {
         "item":
         "3160",
         "level":
         2,
         "tag": ["highway", "fix:chair"],
         "desc":
         T_(u"Bad lanes number or lanes:turn before and after this node")
     }
 def __init__(self, config, logger = None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs_change[1] = {"item":"0", "level": 3, "tag": ["building", "geom", "fix:chair"], "desc": T_(u"Building intersection") }
     self.classs_change[2] = {"item":"0", "level": 2, "tag": ["building", "geom", "fix:chair"], "desc": T_(u"Large building intersection") }
     self.classs_change[3] = {"item":"0", "level": 3, "tag": ["building", "geom", "fix:chair"], "desc": T_(u"Building too small") }
     self.classs_change[4] = {"item":"0", "level": 3, "tag": ["building", "geom", "fix:chair"], "desc": T_(u"Gap between buildings") }
     self.classs_change[5] = {"item":"0", "level": 1, "tag": ["building", "fix:chair"], "desc": T_(u"Large building intersection cluster") }
     self.callback30 = lambda res: {"class":2 if res[3]>res[4] else 1, "data":[self.way, self.way, self.positionAsText]}
     self.callback40 = lambda res: {"class":3, "data":[self.way, self.positionAsText]}
     self.callback50 = lambda res: {"class":4, "data":[self.way, self.way, self.positionAsText]}
     self.callback60 = lambda res: {"class":5, "data":[self.positionAsText]}
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs[1] = {
         "item": "2050",
         "level": 1,
         "tag": ["tag"],
         "desc": {
             "fr": u"Tag parent manquant",
             "en": u"Missing parent tag"
         }
     }
 def __init__(self, config, logger = None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs_change[1] = {"item":"3100", "level": 2, "tag": ["tag", "landuse", "fix:imagery"], "desc": T_(u"Small farm : consider farmyard or building instead") }
     self.callback10 = lambda res: {"class":1, "data":[self.way_full, self.positionAsText], "fix":[
         {"-":["landuse"], "+":{"building":"yes"}},
         {"-":["landuse"], "+":{"building":"farm_auxiliary"}},
         {"-":["landuse"], "+":{"building":"farm"}},
         {"-":["landuse"], "+":{"building":"farmhouse"}},
         {"landuse":"farmyard"},
         {"landuse":"farmland"},
         ]}
 def __init__(self, config, logger = None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs_change[1] = {"item": 3180, "level": 2, "tag": ["relation", "restriction", "fix:survey"], "desc": T_(u"Restriction relation, wrong number of members") }
     self.classs_change[2] = {"item": 3180, "level": 2, "tag": ["relation", "restriction", "fix:chair"], "desc": T_(u"Restriction relation, bad member type") }
     self.classs_change[3] = {"item": 3180, "level": 2, "tag": ["relation", "restriction", "fix:chair"], "desc": T_(u"Unconnected restriction relation ways") }
     self.classs_change[4] = {"item": 3180, "level": 2, "tag": ["relation", "restriction", "fix:survey"], "desc": T_(u"Restriction relation, bad oneway direction on \"from\" member") }
     self.classs_change[5] = {"item": 3180, "level": 2, "tag": ["relation", "restriction", "fix:survey"], "desc": T_(u"Restriction doesn't match topology") }
     self.callback10 = lambda res: {"class":1, "data":[self.relation_full, self.positionAsText] }
     self.callback20 = lambda res: {"class":2, "data":[self.relation_full, self.way_full, self.positionAsText] }
     self.callback30 = lambda res: {"class":3, "data":[self.relation_full, self.positionAsText] }
     self.callback40 = lambda res: {"class":4, "data":[self.relation_full, self.way_full, self.positionAsText] }
     self.callback50 = lambda res: {"class":5, "data":[self.relation_full, self.positionAsText] }
示例#38
0
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs[1] = {
         "item": "1060",
         "level": 2,
         "tag": ["boundary", "geom", "fix:chair"],
         "desc": T_(u"Boundary intersection")
     }
     self.callback20 = lambda res: {
         "class": 1,
         "data": [self.way_full, self.way_full, self.positionAsText]
     }
    def __init__(self, config, logger=None):
        Analyser_Osmosis.__init__(self, config, logger)
        self.tags = ((1, "waterway"), (2, "natural"), (3, "landuse"))

        for t in self.tags:
            self.classs[t[0]] = {
                "item": "1150",
                "level": 3,
                "tag": ["landuse", "geom", "fix:imagery"],
                "desc": T_(u"Area intersection %s", t[1]),
            }
        self.callback10 = lambda res: {"class": res[3], "data": [self.way_full, self.way_full, self.positionAsText]}
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs_change[1] = {
         "item": 3220,
         "level": 1,
         "tag": ["tag", "highway", "fix:chair"],
         "desc": T_(u"Too permissive access to motorway")
     }
     self.callback10 = lambda res: {
         "class": 1,
         "data": [self.way_full, self.positionAsText]
     }
示例#41
0
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs_change[1] = {
         "item": "1",
         "level": 3,
         "tag": ["building", "fix:imagery"],
         "desc": T_(u"Merge building (triangle)")
     }
     self.callback70 = lambda res: {
         "class": 1,
         "data": [self.way_full, self.positionAsText]
     }
示例#42
0
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs_change[1] = {
         "item": "1221",
         "level": 2,
         "tag": ["water", "fix:imagery"],
         "desc": T_(u"Object must be close to coast or water")
     }
     self.callback10 = lambda res: {
         "class": 1,
         "data": [self.any_full, self.positionAsText]
     }
示例#43
0
 def __init__(self, config, logger = None):
     Analyser_Osmosis.__init__(self, config, logger)
     highway_values = ("motorway", "trunk", "primary", "secondary")
     if self.config.options and "osmosis_way_approximate" in self.config.options and self.config.options["osmosis_way_approximate"].get("highway"):
         highway_values = self.config.options["osmosis_way_approximate"].get("highway")
     self.tags = ( (10, "railway", ("rail",)),
                   (20, "waterway", ("river",)),
                   (30, "highway", highway_values),
                 )
     for t in self.tags:
         self.classs_change[t[0]] = {"item":"1190", "level": 3, "tag": ["geom", "highway", "railway", "fix:imagery"], "desc": T_(u"Approximate %s", t[1]) }
     self.callback10 = lambda res: {"class":res[4], "subclass":self.stablehash(res[3]), "data":[self.way_full, self.positionAsText], "text": T_(u"%s discart from %sm", res[3], res[2])}
示例#44
0
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs[1] = {
         "item": "7040",
         "level": 3,
         "tag": ["power", "fix:imagery"],
         "desc": T_(u"Lone power tower or pole")
     }
     self.classs[2] = {
         "item": "7040",
         "level": 2,
         "tag": ["power", "fix:imagery"],
         "desc": T_(u"Unfinished power major line")
     }
     self.classs[6] = {
         "item": "7040",
         "level": 3,
         "tag": ["power", "fix:imagery"],
         "desc": T_(u"Unfinished power minor line")
     }
     self.classs[3] = {
         "item": "7040",
         "level": 3,
         "tag": ["power", "fix:chair"],
         "desc": T_(u"Connection between different voltages")
     }
     self.classs_change[4] = {
         "item": "7040",
         "level": 3,
         "tag": ["power", "fix:imagery"],
         "desc": T_(u"Non power node on power way")
     }
     self.classs_change[5] = {
         "item": "7040",
         "level": 3,
         "tag": ["power", "fix:imagery"],
         "desc": T_(u"Missing power tower or pole")
     }
     self.classs[7] = {
         "item": "7040",
         "level": 3,
         "tag": ["power", "fix:chair"],
         "desc": T_(u"Unmatched voltage of line on substation")
     }
     self.callback40 = lambda res: {
         "class": 4,
         "data": [self.node_full, self.positionAsText]
     }
     self.callback50 = lambda res: {
         "class": 5,
         "data": [self.way_full, self.positionAsText]
     }
 def __init__(self, config, logger = None):
     Analyser_Osmosis.__init__(self, config, logger)
     if "proj" in self.config.options:
         self.classs_change[1] = {"item":"3100", "level": 2, "tag": ["tag", "landuse", "fix:imagery"], "desc": T_(u"Small farm : consider farmyard or building instead") }
         self.callback10 = lambda res: {"class":1, "data":[self.way_full, self.positionAsText], "fix":[
             {"-":["landuse"], "+":{"building":"yes"}},
             {"-":["landuse"], "+":{"building":"farm_auxiliary"}},
             {"-":["landuse"], "+":{"building":"farm"}},
             {"-":["landuse"], "+":{"building":"farmhouse"}},
             {"landuse":"farmyard"},
             {"landuse":"farmland"},
             {"landuse":"allotments"},
             ]}
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs_change[1] = {
         "item": "2010",
         "level": 1,
         "tag": ["highway", "roundabout", "fix:imagery"],
         "desc": T_(u"Missing junction=roundabout"),
     }
     self.callback10 = lambda res: {
         "class": 1,
         "data": [self.way_full, self.positionAsText],
         "fix": {"+": {"junction": "roundabout"}},
     }
示例#47
0
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs[1] = {
         "item": "3161",
         "level": 1,
         "tag": ["highway", "fix:chair"],
         "desc": T_(u"Missing access to parking")
     }
     self.classs[2] = {
         "item": "3161",
         "level": 3,
         "tag": ["highway", "fix:chair"],
         "desc": T_(u"Missing access to parking")
     }
示例#48
0
 def __init__(self, config, logger = None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs_change[1] = {"item": 2090, "level": 3, "tag": ["tag", "highway", "fix:imagery"], "desc": T_(u"Possible crossing=traffic_signals") }
     self.classs[2] = {"item": 2090, "level": 2, "tag": ["tag", "highway", "fix:imagery"], "desc": T_(u"Possible missing highway=traffic_signals nearby") }
     self.classs_change[3] = {"item": 2090, "level": 2, "tag": ["tag", "highway", "fix:chair"], "desc": T_(u"Possible missing traffic_signals:direction or crossing") }
     self.callback10 = lambda res: {"class":1, "data":[self.node_full, self.node_full, self.positionAsText], "fix":[
         [{"+":{"crossing":"traffic_signals"}}],
         [{"+":{"crossing":"traffic_signals"}}, {"-":["crossing"]}]
     ] }
     self.callback20 = lambda res: {"class":2, "data":[self.node_full, self.positionAsText]}
     self.callback30 = lambda res: {"class":3, "data":[self.node_full, self.positionAsText], "fix":[
         [{"+":{"traffic_signals:direction":"forward"}}],
         [{"+":{"traffic_signals:direction":"backward"}}],
     ] }
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs[1] = {
         "item": "3161",
         "level": 1,
         "tag": ["highway", "fix:chair"],
         "desc": T_(u"Missing access to parking"),
     }
     self.classs[2] = {
         "item": "3161",
         "level": 3,
         "tag": ["highway", "fix:chair"],
         "desc": T_(u"Missing access to parking"),
     }
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs[1] = {
         "item": "1250",
         "level": 3,
         "tag": ["highway", "power", "fix:chair"],
         "desc": T_(u"Intersection of unrelated highway and power objects"),
     }
     self.classs[2] = {
         "item": "1250",
         "level": 3,
         "tag": ["highway", "waterway", "fix:chair"],
         "desc": T_(u"Intersection of unrelated highway and waterway objects"),
     }
    def __init__(self, config, logger=None):
        Analyser_Osmosis.__init__(self, config, logger)

        # Check langues for country are writen with alphabets
        self.alphabet = 'language' in config.options and languages.languages_are_alphabets(
            config.options['language'])

        if self.alphabet:
            self.classs_change[1] = {
                "item": "5080",
                "level": 1,
                "tag": ["highway", "name"],
                "desc": T_(u"Close similar name")
            }
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs_change[1] = {
         "item": 7012,
         "level": 3,
         "tag": ["tag", "highway", "fix:survey"],
         "desc": T_(u"Bridge type missing"),
     }
     # self.classs_change[2] = {"item": 7130, "level": 3, "tag": ["tag", "highway", "maxheight", "fix:survey"], "desc": T_(u"Missing maxheight tag") }
     # self.classs_change[3] = {"item": 7130, "level": 3, "tag": ["tag", "highway", "layer", "fix:imagery"], "desc": T_(u"Missing layer tag around bridge") }
     self.callback10 = lambda res: {
         "class": 1,
         "data": [self.way_full, self.positionAsText],
         "fix": [{"~": {"bridge": "viaduct"}}, {"~": {"bridge": "suspension"}}],
     }
示例#53
0
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs_change[1] = {
         "item": "7010",
         "level": 3,
         "tag": ["building", "fix:chair"],
         "desc": T_(u"Geodesic mark without building")
     }
     self.callback10 = lambda res: {
         "class": 1,
         "data": [self.node_full, self.positionAsText],
         "text": {
             "en": res[2]
         }
     }
 def __init__(self, config, logger = None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.FR = config.options and ("country" in config.options and config.options["country"] == "FR" or "test" in config.options)
     self.classs_change[1] = {"item":"0", "level": 3, "tag": ["building", "geom", "fix:chair"], "desc": T_(u"Building intersection") }
     self.classs_change[2] = {"item":"0", "level": 2, "tag": ["building", "geom", "fix:chair"], "desc": T_(u"Large building intersection") }
     self.classs_change[3] = {"item":"0", "level": 3, "tag": ["building", "geom", "fix:chair"], "desc": T_(u"Building too small") }
     self.classs_change[4] = {"item":"0", "level": 3, "tag": ["building", "geom", "fix:chair"], "desc": T_(u"Gap between buildings") }
     self.classs_change[5] = {"item":"0", "level": 1, "tag": ["building", "fix:chair"], "desc": T_(u"Large building intersection cluster") }
     if self.FR:
         self.classs_change[6] = {"item":"1", "level": 3, "tag": ["building", "geom", "fix:chair"], "desc": T_(u"Building in parts") }
     self.callback30 = lambda res: {"class":2 if res[3]>res[4] else 1, "data":[self.way, self.way, self.positionAsText]}
     self.callback40 = lambda res: {"class":3, "data":[self.way, self.positionAsText]}
     self.callback50 = lambda res: {"class":4, "data":[self.way, self.way, self.positionAsText]}
     self.callback60 = lambda res: {"class":5, "data":[self.positionAsText]}
     if self.FR:
         self.callback70 = lambda res: {"class":6, "data":[self.way, self.positionAsText]}
 def __init__(self, config, logger = None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs_change[1] = {"item":"1170", "level": 3, "tag": ["relation", "geom", "fix:chair"], "desc": T_(u"Double inner polygon") }
     self.classs_change[2] = {"item":"1170", "level": 2, "tag": ["relation", "multipolygon", "fix:chair"], "desc": T_(u"Inconsistant multipolygon nature with members nature") }
     self.classs_change[3] = {"item":"1170", "level": 2, "tag": ["relation", "multipolygon", "fix:chair"], "desc": T_(u"Inconsistant multipolygon member nature") }
     self.classs_change[4] = {"item":"1170", "level": 1, "tag": ["relation", "geom", "fix:chair"], "desc": T_(u"Should be polygon or part of multipolygon") }
     self.callback10 = lambda res: {"class":1, "data":[self.way_full, self.way_full, self.positionAsText]}
     self.callback20 = lambda res: {"class":2, "subclass":self.stablehash(res[11]), "data":[self.relation_full, self.way_full, self.positionAsText],
         "text": {"en": u", ".join(map(lambda k: "%s=(%s,%s)"%k, filter(lambda k: k[1], (("landuse",res[3],res[4]), ("natural",res[5],res[6]), ("waterway",res[7],res[8]), ("building",res[9],res[10])))))}
     }
     self.callback30 = lambda res: {"class":3, "subclass":1, "data":[self.relation_full, self.positionAsText],
         "text": {"en": u", ".join(map(lambda k: "%s=(%s)"%k, filter(lambda k: k[1], (("landuse",res[2]), ("natural",res[3]), ("waterway",res[4]), ("building",res[5])))))}
     }
     self.callback40 = lambda res: {"class":4, "subclass":self.stablehash(res[6]), "data":[self.way_full, self.positionAsText],
         "text": {"en": u", ".join(map(lambda k: "%s=%s"%k, filter(lambda k: k[1], (("landuse",res[2]), ("natural",res[3]), ("waterway",res[4]), ("building",res[5])))))}
     }
 def __init__(self, config, logger=None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs_change[1] = {
         "item": "1220",
         "level": 3,
         "tag": ["waterway", "fix:imagery"],
         "desc": T_(u"Riverbank without river"),
     }
     self.classs_change[2] = {
         "item": "1220",
         "level": 3,
         "tag": ["waterway", "fix:imagery"],
         "desc": T_(u"Unconnected waterway or wrong way flow"),
     }
     self.callback10 = lambda res: {"class": 1, "data": [self.way_full, self.positionAsText]}
     self.callback20 = lambda res: {"class": 2, "data": [self.way_full, self.positionAsText]}
 def __init__(self, config, logger = None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.FR = config.options and "country" in config.options and config.options["country"] == "FR"
     self.classs_change[1] = {"item":"7120", "level": 2, "tag": ["boundary", "fix:chair"], "desc": T_(u"Missing admin_centre role") }
     self.classs_change[2] = {"item":"7120", "level": 1, "tag": ["boundary", "name", "fix:chair"], "desc": T_(u"Missing name") }
     if self.FR:
         self.classs_change[3] = {"item":"7120", "level": 2, "tag": ["boundary", "ref", "fix:chair"], "desc": T_(u"Missing ref:INSEE") }
     self.classs_change[4] = {"item":"7120", "level": 2, "tag": ["boundary", "wikipedia", "fix:chair"], "desc": T_(u"Missing wikipedia tag") }
     self.classs_change[5] = {"item":"7120", "level": 3, "tag": ["boundary", "fix:chair"], "desc": T_(u"Different population tag between relation and admin_centre") }
     self.classs_change[6] = {"item":"7120", "level": 2, "tag": ["boundary", "fix:chair"], "desc": T_(u"Invalid role") }
     self.callback10 = lambda res: {"class":1, "data":[self.relation_full, self.positionAsText]}
     self.callback20 = lambda res: {"class":2, "data":[self.relation_full, self.positionAsText]}
     self.callback30 = lambda res: {"class":3, "data":[self.relation_full, self.positionAsText], "fix":{"ref:INSEE": res[2]} if res[2] else None}
     self.callback40 = lambda res: {"class":4, "data":[self.relation_full, self.positionAsText], "fix":{"wikipedia": res[2]} if res[2] else None}
     self.callback50 = lambda res: {"class":5, "data":[self.relation_full, self.positionAsText], "text":{"en": u"Population on admin_centre role (%s) greater than population on the relation (%s)" % (res[2], res[3]), "fr": u"Population du rôle admin_centre (%s) supérieure à la population de la relation (%s)" % (res[2], res[3]), "es": u"La población del rol admin_centre (%s) supera la población de la relación (%s)"% (res[2], res[3])}}
     self.callback60 = lambda res: {"class":6, "data":[self.relation_full, self.positionAsText], "text":{"en":  res[2]}}
 def __init__(self, config, logger = None):
     Analyser_Osmosis.__init__(self, config, logger)
     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") }
     self.classs_change[2] = {"item":"2060", "level": 2, "tag": ["addr", "relation", "fix:chair"], "desc": T_(u"No street role") }
     self.classs_change[3] = {"item":"2060", "level": 2, "tag": ["addr", "fix:chair"], "desc": T_(u"street role is not an highway") }
     self.classs_change[4] = {"item":"2060", "level": 3, "tag": ["addr", "relation", "fix:chair"], "desc": T_(u"Roleless member") }
     self.classs_change[5] = {"item":"2060", "level": 3, "tag": ["addr", "fix:chair"], "desc": T_(u"Member without addr:housenumber") }
     self.classs[6] = {"item":"2060", "level": 3, "tag": ["addr", "fix:survey"], "desc": T_(u"Number twice in the street") }
     self.classs[7] = {"item":"2060", "level": 2, "tag": ["addr", "fix:chair"], "desc": T_(u"Many street names") }
     self.classs[8] = {"item":"2060", "level": 2, "tag": ["addr", "relation", "fix:chair"], "desc": T_(u"Many relations on one street") }
     self.classs[9] = {"item":"2060", "level": 2, "tag": ["addr", "geom", "fix:chair"], "desc": T_(u"House too far away from street") }
     self.callback20 = lambda res: {"class":2, "subclass":1, "data":[self.relation_full, self.positionAsText]}
     self.callback30 = lambda res: {"class":3, "subclass":1, "data":[self.way_full, self.relation, self.positionAsText]}
     self.callback40 = lambda res: {"class":4, "subclass":1, "data":[self.node_full, self.relation, self.positionAsText]}
     self.callback41 = lambda res: {"class":4, "subclass":2, "data":[self.way_full, self.relation, self.positionAsText]}
     self.callback50 = lambda res: {"class":5, "subclass":1, "data":[self.node_full, self.relation, self.positionAsText]}
     self.callback51 = lambda res: {"class":5, "subclass":1, "data":[self.way_full, self.relation, self.positionAsText]}
 def __init__(self, config, logger = None):
     Analyser_Osmosis.__init__(self, config, logger)
     self.classs_change[1] = {"item":"7011", "level": 3, "tag": ["building", "fix:imagery"], "desc": T_(u"Special building (round)") }
     self.classs_change[2] = {"item":"7011", "level": 3, "tag": ["building", "fix:imagery"], "desc": T_(u"Special building (large)") }
     self.callback10 = lambda res: {"class":1, "data":[self.way_full, self.positionAsText], "fix":[
         {"+":{"man_made":"water_tower"}},
         {"+":{"man_made":"reservoir_covered"}},
         {"+":{"man_made":"wastewater_plant"}},
         {"+":{"man_made":"storage_tank"}},
         ]}
     self.callback20 = lambda res: {"class":2, "data":[self.way_full, self.positionAsText], "fix":[
         {"+":{"man_made":"works"}},
         {"+":{"shop":"mall"}},
         {"+":{"shop":"supermarket"}},
         {"~":{"building":"warehouse"}},
         {"~":{"building":"industrial"}},
         ]}