Changeset 6138 in josm


Ignore:
Timestamp:
2013-08-11T20:20:49+02:00 (7 years ago)
Author:
Don-vip
Message:

see #8847, fix #8961 - rendering of power=plant, deprecation of power=station

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/tests/DeprecatedTags.java

    r5927 r6138  
    2121import org.openstreetmap.josm.tools.Utils;
    2222
     23/**
     24 * Checks and corrects deprecated tags.
     25 * @since 4442
     26 */
    2327public class DeprecatedTags extends Test {
    2428
    2529    private List<DeprecationCheck> checks = new LinkedList<DeprecationCheck>();
    2630
     31    /**
     32     * Constructs a new {@code DeprecatedTags} test.
     33     */
    2734    public DeprecatedTags() {
    2835        super(tr("Deprecated Tags"), tr("Checks and corrects deprecated tags."));
     
    9198                testAndRemove("sport", "gaelic_football").
    9299                add("sport", "gaelic_games"));
    93     }
    94 
     100        // http://wiki.openstreetmap.org/wiki/Tag:power=station
     101        // see #8847 / #8961
     102        checks.add(new DeprecationCheck(2118).
     103                test("power", "station").
     104                alternative("power", "plant").
     105                alternative("power", "sub_station"));
     106        checks.add(new DeprecationCheck(2119).
     107                testAndRemove("generator:method", "dam").
     108                add("generator:method", "water-storage"));
     109        checks.add(new DeprecationCheck(2120).
     110                testAndRemove("generator:method", "pumped-storage").
     111                add("generator:method", "water-pumped-storage"));
     112        checks.add(new DeprecationCheck(2121).
     113                testAndRemove("generator:method", "pumping").
     114                add("generator:method", "water-pumped-storage"));
     115    }
     116
     117    /**
     118     * Visiting call for primitives.
     119     * @param p The primitive to inspect.
     120     */
    95121    public void visit(OsmPrimitive p) {
    96122        for (DeprecationCheck check : checks) {
     
    149175            return test(key, value).remove(key);
    150176        }
    151 
     177/*
    152178        DeprecationCheck testAndRemove(String key) {
    153179            return test(key).remove(key);
    154180        }
    155 
     181*/
    156182        DeprecationCheck alternative(String key, String value) {
    157183            alternatives.add(new Tag(key, value));
  • trunk/styles/standard/elemstyles.xml

    r6005 r6138  
    12581258
    12591259        <rule>
    1260                 <condition k="power" v="station"/>
     1260                <condition k="power" v="plant"/>
    12611261                <icon annotate="true" src="misc/landmark/power.png"/>
    12621262                <area colour="power#eeeeee"/>
     
    12801280        </rule>
    12811281
    1282         <!-- power_source is depricated by the wiki, but still in use -->
     1282        <!-- power_source is deprecated by the wiki, but still in use -->
    12831283        <rule>
    12841284                <condition k="power_source" v="wind"/>
     
    38833883    <!-- natural=marsh -> natural=wetland -->
    38843884    <!-- leisure=zoo -> tourism=zoo -->
     3885    <!-- power=station -> power=plant or power=sub_station -->
    38853886
    38863887</rules>
Note: See TracChangeset for help on using the changeset viewer.