Ignore:
Timestamp:
2015-02-17T14:05:54+01:00 (11 years ago)
Author:
malcolmh
Message:

coast/land processing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/seachart/src/s57/S57obj.java

    r30992 r31014  
    1010package s57;
    1111
    12 import java.util.EnumMap;
    13 import java.util.HashMap;
    14 import java.util.Map;
     12import java.util.*;
    1513
    1614public class S57obj {
     
    179177                        return Obj.UNKOBJ;
    180178        }
     179       
     180        private static final HashMap<String, Obj> OSMtags = new HashMap<String, Obj>();
     181        static {
     182                OSMtags.put("natural=coastline", Obj.COALNE); OSMtags.put("natural=water", Obj.LAKARE);
     183                OSMtags.put("waterway=riverbank", Obj.RIVBNK); OSMtags.put("waterway=river", Obj.RIVERS); OSMtags.put("waterway=canal", Obj.CANALS);
     184                OSMtags.put("wetland=tidalflat", Obj.DEPARE);
     185        }
     186       
     187        public static Obj OSMobj(String key, String val) {
     188                Obj obj = OSMtags.get(key + "=" + val);
     189                if (obj != null) {
     190                        return obj;
     191                }
     192                return Obj.UNKOBJ;
     193        }
    181194
    182195}
Note: See TracChangeset for help on using the changeset viewer.