Changeset d5f9738 in osmose-backend


Ignore:
Timestamp:
Mar 12, 2013 11:03:12 PM (7 years ago)
Author:
Jocelyn Jaubert <jocelyn.jaubert@…>
Branches:
master
Children:
c8440a1, 996213d
Parents:
b802c41
git-author:
Frédéric Rodrigo <frodrigo@…> (12/03/2013 22:46:13)
git-committer:
Jocelyn Jaubert <jocelyn.jaubert@…> (12/03/2013 23:03:12)
Message:

Support very low speed limit on waterway into plugin Number

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/Number.py

    r6a7d4ab rd5f9738  
    4141                elif m and i=="height" and float(m.group(1)) > 500: 
    4242                    return [(3091, 2, {"fr": u"C'est très haut %s, voir ele=*" % m.group(1), "en": u"%s is really tall, look at ele=*" % m.group(1), "fix": {"-": ["height"], "+": {"ele": tags["height"]}} })] 
    43                 elif m and i=="maxspeed" and float(m.group(1)) < 5: 
     43                elif m and i=="maxspeed" and float(m.group(1)) < 5 and not "waterway" in tags: 
    4444                    return [(3091, 3, {"fr": u"C'est très lent %s" % m.group(1), "en": u"%s is really slow" % m.group(1)})] 
    4545 
     
    6767        if a.node(None, {"maxspeed":d}): 
    6868            print "fail: %s" % d 
     69    if not a.node(None, {"maxspeed":"1"}): 
     70        print "fail maxspped" 
     71    if a.node(None, {"maxspeed":"1", "waterway": "river"}): 
     72        print "fail maxspped+waterway" 
Note: See TracChangeset for help on using the changeset viewer.